Compare commits

...

31 Commits

Author SHA1 Message Date
170f9c9313 更新 inject.js 2025-10-15 08:15:52 +00:00
2a8b4b42bc 更新 inject.js 2025-10-15 08:06:21 +00:00
9dbdfbd42b 更新 inject.js 2025-10-15 07:36:36 +00:00
08ffdff1ee update 2025-05-21 18:31:19 +08:00
1820102e44 fix 2025-05-21 18:10:13 +08:00
a579a16eea update 2025-03-12 16:59:21 +08:00
f6f3ac26d0 update 2025-03-12 16:59:04 +08:00
0de2613a2a update 2025-03-12 16:50:16 +08:00
86ba1b3f56 update 2025-03-12 16:49:36 +08:00
f7c064cba9 update 2025-03-12 16:44:58 +08:00
2a3ee82e8a update 2025-03-12 16:42:34 +08:00
83144f737c update 2025-03-12 15:55:21 +08:00
9eb9e48875 update 2025-01-22 19:12:59 +08:00
3bcb0dae8b update 2025-01-22 19:02:01 +08:00
0811b9a962 Update file inject.js 2024-02-18 10:58:02 +00:00
897a9f3cb7 Update file inject.js 2024-02-18 10:51:11 +00:00
53af65e4f2 Update Dockerfile 2024-02-18 10:23:45 +00:00
082fac842d Update 3 files
- /dist.tgz
- /docker-entrypoint.sh
- /Dockerfile
2024-01-16 03:23:55 +00:00
cuichenyang
9eef534193 update 2023-12-01 12:34:01 +08:00
cuichenyang
487aa30812 updatew 2023-12-01 12:32:02 +08:00
cuichenyang
ccf5989aa5 Merge remote-tracking branch 'origin/main' 2023-11-30 15:35:48 +08:00
f66683d772 Merge branch 'set-secret-detection-config-1' into 'main'
在 `.gitlab-ci.yml` 中配置 Secret 检测,如果该文件不存在则创建此文件

See merge request crack/n8n!2
2023-11-16 09:33:10 +00:00
111fb1009b .gitlab-ci.yml 中配置 Secret 检测,如果该文件不存在则创建此文件 2023-11-16 09:29:50 +00:00
c52ed011c9 更新.gitlab-ci.yml文件 2023-11-16 09:26:59 +00:00
4cd8b02891 Merge branch 'set-container-scanning-config-1' into 'main'
在 `.gitlab-ci.yml` 中配置容器扫描,如果该文件不存在则创建该文件

See merge request crack/n8n!1
2023-11-16 09:25:00 +00:00
999f91cbfa Update file .gitlab-ci.yml 2023-11-16 09:22:21 +00:00
84d2988c82 Update file .gitlab-ci.yml 2023-11-16 09:22:11 +00:00
639bd83262 Update file .gitlab-ci.yml 2023-11-16 09:16:39 +00:00
95ed08d25c .gitlab-ci.yml 中配置容器扫描,如果该文件不存在则创建该文件 2023-11-16 09:14:12 +00:00
948ca15fe3 Update docker-entrypoint.sh 2023-11-16 06:42:31 +00:00
59b675e29a Update docker-entrypoint.sh 2023-11-16 06:38:19 +00:00
10 changed files with 15028 additions and 254 deletions

View File

@@ -0,0 +1,34 @@
name: Patch
on:
workflow_dispatch:
inputs:
tag:
description: "Docker tag"
required: true
default: "latest"
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: git.yoshino-s.xyz
username: ${{ gitea.repository_owner }}
password: ${{ secrets.PACKAGES_PASSWORD }}
- name: Replace tag
run: |
sed -i "s/latest/${{ gitea.event.inputs.tag }}/g" Dockerfile
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: git.yoshino-s.xyz/${{ gitea.repository }}:${{ gitea.event.inputs.tag }}

263
.gitignore vendored
View File

@@ -1,176 +1,145 @@
# Created by https://www.toptal.com/developers/gitignore/api/python
# Edit at https://www.toptal.com/developers/gitignore?templates=python
# Created by https://www.toptal.com/developers/gitignore/api/node
# Edit at https://www.toptal.com/developers/gitignore?templates=node
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
### Node ###
# Logs
logs
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Flask stuff:
instance/
.webassets-cache
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Scrapy stuff:
.scrapy
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Sphinx documentation
docs/_build/
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# PyBuilder
.pybuilder/
target/
# Coverage directory used by tools like istanbul
coverage
*.lcov
# Jupyter Notebook
.ipynb_checkpoints
# nyc test coverage
.nyc_output
# IPython
profile_default/
ipython_config.py
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# Bower dependency directory (https://bower.io/)
bower_components
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# node-waf configuration
.lock-wscript
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# Dependency directories
node_modules/
jspm_packages/
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# TypeScript cache
*.tsbuildinfo
# SageMath parsed files
*.sage.py
# Optional npm cache directory
.npm
# Environments
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
.env.development.local
.env.test.local
.env.production.local
.env.local
# Spyder project settings
.spyderproject
.spyproject
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Rope project settings
.ropeproject
# Next.js build output
.next
out
# mkdocs documentation
/site
# Nuxt.js build / generate output
.nuxt
dist
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# Pyre type checker
.pyre/
# vuepress build output
.vuepress/dist
# pytype static type analyzer
.pytype/
# vuepress v2.x temp and cache directory
.temp
# Cython debug symbols
cython_debug/
# Docusaurus cache and generated files
.docusaurus
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# Serverless directories
.serverless/
### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml
# FuseBox cache
.fusebox/
# ruff
.ruff_cache/
# DynamoDB Local files
.dynamodb/
# LSP config files
pyrightconfig.json
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
### Node Patch ###
# Serverless Webpack directories
.webpack/
# Optional stylelint cache
# SvelteKit build / generate output
.svelte-kit
# End of https://www.toptal.com/developers/gitignore/api/node
# End of https://www.toptal.com/developers/gitignore/api/python

View File

@@ -1,23 +0,0 @@
stages:
- release
variables:
TAGS: ""
release-image:
image: docker:24.0.6
stage: release
rules:
- if: '$TAGS'
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- if [ -z "$TAGS" ]; then export TAGS=$(cat tags.txt); fi
- |
for tag in $TAGS; do
export IMAGE_TAG=$CI_REGISTRY_IMAGE:$tag
echo $IMAGE_TAG
sed "s/latest/$tag/g" Dockerfile > Dockerfile.tmp
docker build . --pull -f Dockerfile.tmp -t $IMAGE_TAG
docker push $IMAGE_TAG
done

View File

@@ -1,13 +0,0 @@
repos:
- repo: https://github.com/python-poetry/poetry
rev: "1.5.1"
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
- id: poetry-export
args: ["--with=dev", "-o", "requirements.dev.txt"]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: "v1.7.0"
hooks:
- id: autopep8

View File

@@ -1,12 +1,9 @@
#first stage - builder
FROM n8nio/n8n:latest
FROM ghcr.io/n8n-io/n8n:latest
USER root
COPY inject.js /tmp
COPY dist.tgz /tmp
RUN cat /tmp/inject.js >> /usr/local/lib/node_modules/n8n/packages/cli/dist/License.js
COPY docker-entrypoint.sh /
RUN cat /tmp/inject.js >> /usr/local/lib/node_modules/n8n/dist/license.js
USER node

BIN
dist.tgz

Binary file not shown.

View File

@@ -1,23 +0,0 @@
#!/bin/sh
mkdir -p ~/.n8n/nodes
if [ -n "$NPM_PACKAGES" ]; then
cd ~/.n8n/nodes
npm install $NPM_PACKAGES
cd -
fi
if [ -n "$CUSTOM_UI" ]; then
# extract /tmp/dist.tgz to /usr/local/lib/node_modules/n8n/packages/dits
rm -rf /usr/local/lib/node_modules/n8n/packages/dits
tar -xzf /tmp/dist.tgz -C /usr/local/lib/node_modules/n8n/packages
rm /tmp/dist.tgz
fi
if [ "$#" -gt 0 ]; then
# Got started with arguments
exec n8n "$@"
else
# Got started without arguments
exec n8n
fi

View File

@@ -1,48 +1,48 @@
license_sdk_1.LicenseManager.prototype.licenseCert = {
consumerId: "n8n",
version: 1,
tenantId: 1,
renewalToken: "123",
deviceLock: false,
deviceFingerprint: "888",
createdAt: new Date(),
issuedAt: new Date(),
expiresAt: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365),
terminatesAt: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365),
entitlements: [
{
id: "1",
productId: "123",
productMetadata: {
terms: {
isMainPlan: true,
consumerId: "n8n",
version: 1,
tenantId: 1,
renewalToken: "123",
deviceLock: false,
deviceFingerprint: "888",
createdAt: new Date(),
issuedAt: new Date(),
expiresAt: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365),
terminatesAt: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365),
entitlements: [
{
id: "1",
productId: "123",
productMetadata: {
terms: {
isMainPlan: true,
},
},
validFrom: new Date(),
validTo: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365),
features: {
planName: "Enterprise",
...Object.
fromEntries(
Object.values(constants_1.LICENSE_FEATURES).
filter((f) => !(['feat:apiDisabled', 'feat:showNonProdBanner'].includes(f))).
map((f) => [f, true]),
),
...Object.fromEntries(
Object.values(constants_1.LICENSE_QUOTAS).
map((f) => [f, -1]),
),
},
},
},
validFrom: new Date(),
validTo: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365),
features: {
planName: "Hacky",
"feat:sharing": true,
"feat:ldap": true,
"feat:saml": true,
"feat:logStreaming": true,
"feat:advancedExecutionFilters": true,
"feat:variables": true,
"feat:debugInEditor": true,
"feat:workflowHistory": true,
"feat:showNonProdBanner": true,
"feat:externalSecrets": true,
"feat:apiDisabled": true,
"feat:sourceControl": true,
},
},
],
managementJwt: "123",
isEphemeral: true,
],
managementJwt: "123",
isEphemeral: true,
};
console.log('License', license_sdk_1.LicenseManager.prototype.licenseCert);
license_sdk_1.LicenseManager.prototype.updateCurrentFeatures();
license_sdk_1.LicenseManager.prototype.isInitialized = () => true;
license_sdk_1.LicenseManager.prototype.activate = () => {};
license_sdk_1.LicenseManager.prototype.renew = () => {};
license_sdk_1.LicenseManager.prototype.reset = () => {};
// license_sdk_1.LicenseManager.prototype.isInitialized = () => true;
license_sdk_1.LicenseManager.prototype.activate = () => { };
license_sdk_1.LicenseManager.prototype.initialize = () => { };
license_sdk_1.LicenseManager.prototype.renew = () => { };
license_sdk_1.LicenseManager.prototype.reset = () => { };

16
package.json Normal file
View File

@@ -0,0 +1,16 @@
{
"name": "n8n",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"packageManager": "pnpm@10.11.0",
"dependencies": {
"n8n": "^1.93.0"
}
}

14817
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff