@zuplo/cli 6.70.30 → 6.70.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/middleware/check-pnpm-lifecycle.test.js.map +1 -1
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +21 -21
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +2 -1
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/hono/dist/cjs/hono-base.js +9 -4
- package/node_modules/hono/dist/cjs/middleware/ip-restriction/index.js +58 -28
- package/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +1 -1
- package/node_modules/hono/dist/cjs/utils/cookie.js +1 -1
- package/node_modules/hono/dist/cjs/utils/ipaddr.js +186 -8
- package/node_modules/hono/dist/hono-base.js +9 -4
- package/node_modules/hono/dist/middleware/ip-restriction/index.js +60 -29
- package/node_modules/hono/dist/middleware/jwk/jwk.js +1 -1
- package/node_modules/hono/dist/middleware/jwt/jwt.js +1 -1
- package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +1 -1
- package/node_modules/hono/dist/types/jsx/base.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/index.d.ts +1 -1
- package/node_modules/hono/dist/types/utils/ipaddr.d.ts +4 -0
- package/node_modules/hono/dist/utils/cookie.js +1 -1
- package/node_modules/hono/dist/utils/ipaddr.js +185 -8
- package/node_modules/hono/package.json +1 -1
- package/node_modules/pg-protocol/dist/buffer-reader.js.map +1 -1
- package/node_modules/pg-protocol/dist/serializer.d.ts +1 -0
- package/node_modules/pg-protocol/package.json +4 -4
- package/node_modules/pg-protocol/src/buffer-reader.ts +1 -1
- package/node_modules/protobufjs/README.md +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.js +8 -6
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +8 -6
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/index.d.ts +2 -1
- package/node_modules/protobufjs/package.json +2 -2
- package/node_modules/protobufjs/src/converter.js +5 -3
- package/node_modules/protobufjs/src/type.js +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-pnpm-lifecycle.test.js","sourceRoot":"","sources":["../../../src/common/middleware/check-pnpm-lifecycle.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,YAAY,GACb,MAAM,2BAA2B,CAAC;AAEnC,MAAM,YAAY,GAAG,iCAAiC,CAAC;AAEvD,MAAM,oBAAoB,GAAG;IAC3B,gBAAgB;IAChB,gBAAgB;IAChB,0BAA0B;IAC1B,oBAAoB;IACpB,mBAAmB;IACnB,EAAE;CACH,C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AAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;QACpE,SAAS,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACvC,gBAAgB,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;QAC/C,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAClE,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACpC,MAAM,CAAC,KAAK,CAAC,MAAO,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;QACpD,MAAM,CAAC,KAAK,CAAC,MAAO,CAAC,OAAO,EAAE,2BAA2B,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iEAAiE,EAAE,GAAG,EAAE;QAKzE,gBAAgB,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;QAE5C,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;QAGlE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC;QAChC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import assert from \"node:assert\";\nimport { mkdirSync, mkdtempSync, rmSync, writeFileSync } from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { afterEach, beforeEach, describe, it } from \"node:test\";\nimport {\n buildDlxMessage,\n buildProjectMessage,\n decideAction,\n} from \"./check-pnpm-lifecycle.js\";\n\nconst SKIP_ENV_VAR = \"ZUPLO_SKIP_PNPM_LIFECYCLE_CHECK\";\n\nconst BLOCKED_MODULES_YAML = [\n \"ignoredBuilds:\",\n \" - deno@2.3.1\",\n \" - workerd@1.20241230.0\",\n \" - esbuild@0.25.2\",\n \"pendingBuilds: []\",\n \"\",\n].join(\"\\n\");\n\nconst CLEAN_MODULES_YAML = \"ignoredBuilds: []\\npendingBuilds: []\\n\";\n\nfunction writeModulesYaml(dir: string, contents: string): void {\n const nm = path.join(dir, \"node_modules\");\n mkdirSync(nm, { recursive: true });\n writeFileSync(path.join(nm, \".modules.yaml\"), contents);\n}\n\ndescribe(\"buildDlxMessage\", () => {\n it(\"includes the --allow-build flags and the user's command\", () => {\n const msg = buildDlxMessage(\"deno, workerd\", \"deploy\");\n assert.match(msg, /--allow-build=deno/);\n assert.match(msg, /--allow-build=workerd/);\n assert.match(msg, /--allow-build=esbuild/);\n assert.match(msg, /--allow-build=@swc\\/core/);\n assert.match(msg, /--allow-build=protobufjs/);\n assert.match(msg, /pnpm zuplo deploy/);\n });\n\n it(\"preserves nested subcommand paths in suggestion\", () => {\n const msg = buildDlxMessage(\"deno\", \"project create my-app\");\n assert.match(msg, /pnpx .* zuplo project create my-app/);\n assert.match(msg, /pnpm zuplo project create my-app/);\n });\n\n it(\"includes the onlyBuiltDependencies block as a prerequisite\", () => {\n const msg = buildDlxMessage(\"deno\", \"deploy\");\n assert.match(msg, /onlyBuiltDependencies:/);\n assert.match(msg, /- deno/);\n assert.match(msg, /- esbuild/);\n assert.match(msg, /- workerd/);\n assert.match(msg, /- \"@swc\\/core\"/);\n assert.match(msg, /- protobufjs/);\n });\n\n it(\"places onlyBuiltDependencies at column 0 for paste-safety\", () => {\n const msg = buildDlxMessage(\"deno\", \"deploy\");\n assert.match(msg, /^onlyBuiltDependencies:$/m);\n });\n\n it(\"includes the package.json alternative\", () => {\n const msg = buildDlxMessage(\"deno\", \"deploy\");\n assert.match(msg, /^\"pnpm\": \\{$/m);\n assert.match(msg, /\"onlyBuiltDependencies\": \\[.*\"deno\".*\\]/);\n });\n});\n\ndescribe(\"buildProjectMessage\", () => {\n it(\"includes the onlyBuiltDependencies block and pnpm install\", () => {\n const msg = buildProjectMessage(\"deno, workerd\");\n assert.match(msg, /onlyBuiltDependencies:/);\n assert.match(msg, /- deno/);\n assert.match(msg, /- workerd/);\n assert.match(msg, /pnpm install/);\n });\n\n it(\"places onlyBuiltDependencies at column 0 for paste-safety\", () => {\n const msg = buildProjectMessage(\"deno\");\n assert.match(msg, /^onlyBuiltDependencies:$/m);\n });\n\n it(\"includes the package.json alternative\", () => {\n const msg = buildProjectMessage(\"deno\");\n assert.match(msg, /^\"pnpm\": \\{$/m);\n assert.match(msg, /\"onlyBuiltDependencies\": \\[.*\"deno\".*\\]/);\n });\n\n it(\"does NOT include --allow-build (that's only for dlx)\", () => {\n const msg = buildProjectMessage(\"deno\");\n assert.doesNotMatch(msg, /--allow-build/);\n });\n});\n\ndescribe(\"decideAction\", () => {\n let tmp: string;\n let prevSkip: string | undefined;\n\n beforeEach(() => {\n tmp = mkdtempSync(path.join(os.tmpdir(), \"zup-decide-\"));\n // biome-ignore lint/style/noProcessEnv: test setup\n prevSkip = process.env[SKIP_ENV_VAR];\n // biome-ignore lint/style/noProcessEnv: test setup\n delete process.env[SKIP_ENV_VAR];\n });\n\n afterEach(() => {\n rmSync(tmp, { recursive: true, force: true });\n if (prevSkip === undefined) {\n // biome-ignore lint/style/noProcessEnv: test teardown\n delete process.env[SKIP_ENV_VAR];\n } else {\n // biome-ignore lint/style/noProcessEnv: test teardown\n process.env[SKIP_ENV_VAR] = prevSkip;\n }\n });\n\n it(\"returns null when no .modules.yaml is found\", () => {\n assert.strictEqual(decideAction({ _: [\"deploy\"] }, tmp), null);\n });\n\n it(\"returns null when no critical builds are blocked\", () => {\n writeModulesYaml(tmp, CLEAN_MODULES_YAML);\n assert.strictEqual(decideAction({ _: [\"deploy\"] }, tmp), null);\n });\n\n it(\"returns project message when blocked deps exist outside dlx\", () => {\n writeModulesYaml(tmp, BLOCKED_MODULES_YAML);\n const result = decideAction({ _: [\"deploy\"] }, tmp);\n assert.notStrictEqual(result, null);\n assert.match(result!.message, /onlyBuiltDependencies:/);\n assert.doesNotMatch(result!.message, /--allow-build/);\n });\n\n it(\"returns dlx message when blocked deps exist in pnpm dlx tree\", () => {\n const dlxDir = path.join(tmp, \"pnpm\", \"dlx\", \"fake-hash\", \"subdir\");\n mkdirSync(dlxDir, { recursive: true });\n writeModulesYaml(dlxDir, BLOCKED_MODULES_YAML);\n const result = decideAction({ _: [\"project\", \"create\"] }, dlxDir);\n assert.notStrictEqual(result, null);\n assert.match(result!.message, /--allow-build=deno/);\n assert.match(result!.message, /pnpm zuplo project create/);\n });\n\n it(\"returns null when bypass env var is set, even with blocked deps\", () => {\n // This is the critical regression test: with blocked deps in the\n // fixture, the ONLY way to get null is if the bypass branch fires\n // before getBlockedCriticalDeps runs. A typo in SKIP_ENV_VAR or a\n // removed early-return would cause this assertion to fail.\n writeModulesYaml(tmp, BLOCKED_MODULES_YAML);\n // Sanity: confirm the fixture is actually broken without bypass\n assert.notStrictEqual(decideAction({ _: [\"deploy\"] }, tmp), null);\n\n // biome-ignore lint/style/noProcessEnv: explicit bypass under test\n process.env[SKIP_ENV_VAR] = \"1\";\n assert.strictEqual(decideAction({ _: [\"deploy\"] }, tmp), null);\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"check-pnpm-lifecycle.test.js","sourceRoot":"","sources":["../../../src/common/middleware/check-pnpm-lifecycle.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,E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AE,IAAI,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import assert from \"node:assert\";\nimport { mkdirSync, mkdtempSync, rmSync, writeFileSync } from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { afterEach, beforeEach, describe, it } from \"node:test\";\nimport {\n buildDlxMessage,\n buildProjectMessage,\n decideAction,\n} from \"./check-pnpm-lifecycle.js\";\n\nconst SKIP_ENV_VAR = \"ZUPLO_SKIP_PNPM_LIFECYCLE_CHECK\";\n\nconst BLOCKED_MODULES_YAML = [\n \"ignoredBuilds:\",\n \" - deno@2.3.1\",\n \" - workerd@1.20241230.0\",\n \" - esbuild@0.25.2\",\n \"pendingBuilds: []\",\n \"\",\n].join(\"\\n\");\n\nconst CLEAN_MODULES_YAML = \"ignoredBuilds: []\\npendingBuilds: []\\n\";\n\nfunction writeModulesYaml(dir: string, contents: string): void {\n const nm = path.join(dir, \"node_modules\");\n mkdirSync(nm, { recursive: true });\n writeFileSync(path.join(nm, \".modules.yaml\"), contents);\n}\n\ndescribe(\"buildDlxMessage\", () => {\n it(\"includes the --allow-build flags and the user's command\", () => {\n const msg = buildDlxMessage(\"deno, workerd\", \"deploy\");\n assert.match(msg, /--allow-build=deno/);\n assert.match(msg, /--allow-build=workerd/);\n assert.match(msg, /--allow-build=esbuild/);\n assert.match(msg, /--allow-build=@swc\\/core/);\n assert.match(msg, /--allow-build=protobufjs/);\n assert.match(msg, /pnpm zuplo deploy/);\n });\n\n it(\"preserves nested subcommand paths in suggestion\", () => {\n const msg = buildDlxMessage(\"deno\", \"project create my-app\");\n assert.match(msg, /pnpx .* zuplo project create my-app/);\n assert.match(msg, /pnpm zuplo project create my-app/);\n });\n\n it(\"includes the onlyBuiltDependencies block as a prerequisite\", () => {\n const msg = buildDlxMessage(\"deno\", \"deploy\");\n assert.match(msg, /onlyBuiltDependencies:/);\n assert.match(msg, /- deno/);\n assert.match(msg, /- esbuild/);\n assert.match(msg, /- workerd/);\n assert.match(msg, /- \"@swc\\/core\"/);\n assert.match(msg, /- protobufjs/);\n });\n\n it(\"places onlyBuiltDependencies at column 0 for paste-safety\", () => {\n const msg = buildDlxMessage(\"deno\", \"deploy\");\n assert.match(msg, /^onlyBuiltDependencies:$/m);\n });\n\n it(\"includes the package.json alternative\", () => {\n const msg = buildDlxMessage(\"deno\", \"deploy\");\n assert.match(msg, /^\"pnpm\": \\{$/m);\n assert.match(msg, /\"onlyBuiltDependencies\": \\[.*\"deno\".*\\]/);\n });\n});\n\ndescribe(\"buildProjectMessage\", () => {\n it(\"includes the onlyBuiltDependencies block and pnpm install\", () => {\n const msg = buildProjectMessage(\"deno, workerd\");\n assert.match(msg, /onlyBuiltDependencies:/);\n assert.match(msg, /- deno/);\n assert.match(msg, /- workerd/);\n assert.match(msg, /pnpm install/);\n });\n\n it(\"places onlyBuiltDependencies at column 0 for paste-safety\", () => {\n const msg = buildProjectMessage(\"deno\");\n assert.match(msg, /^onlyBuiltDependencies:$/m);\n });\n\n it(\"includes the package.json alternative\", () => {\n const msg = buildProjectMessage(\"deno\");\n assert.match(msg, /^\"pnpm\": \\{$/m);\n assert.match(msg, /\"onlyBuiltDependencies\": \\[.*\"deno\".*\\]/);\n });\n\n it(\"does NOT include --allow-build (that's only for dlx)\", () => {\n const msg = buildProjectMessage(\"deno\");\n assert.doesNotMatch(msg, /--allow-build/);\n });\n});\n\ndescribe(\"decideAction\", () => {\n let tmp: string;\n let prevSkip: string | undefined;\n\n beforeEach(() => {\n tmp = mkdtempSync(path.join(os.tmpdir(), \"zup-decide-\"));\n prevSkip = process.env[SKIP_ENV_VAR];\n delete process.env[SKIP_ENV_VAR];\n });\n\n afterEach(() => {\n rmSync(tmp, { recursive: true, force: true });\n if (prevSkip === undefined) {\n delete process.env[SKIP_ENV_VAR];\n } else {\n process.env[SKIP_ENV_VAR] = prevSkip;\n }\n });\n\n it(\"returns null when no .modules.yaml is found\", () => {\n assert.strictEqual(decideAction({ _: [\"deploy\"] }, tmp), null);\n });\n\n it(\"returns null when no critical builds are blocked\", () => {\n writeModulesYaml(tmp, CLEAN_MODULES_YAML);\n assert.strictEqual(decideAction({ _: [\"deploy\"] }, tmp), null);\n });\n\n it(\"returns project message when blocked deps exist outside dlx\", () => {\n writeModulesYaml(tmp, BLOCKED_MODULES_YAML);\n const result = decideAction({ _: [\"deploy\"] }, tmp);\n assert.notStrictEqual(result, null);\n assert.match(result!.message, /onlyBuiltDependencies:/);\n assert.doesNotMatch(result!.message, /--allow-build/);\n });\n\n it(\"returns dlx message when blocked deps exist in pnpm dlx tree\", () => {\n const dlxDir = path.join(tmp, \"pnpm\", \"dlx\", \"fake-hash\", \"subdir\");\n mkdirSync(dlxDir, { recursive: true });\n writeModulesYaml(dlxDir, BLOCKED_MODULES_YAML);\n const result = decideAction({ _: [\"project\", \"create\"] }, dlxDir);\n assert.notStrictEqual(result, null);\n assert.match(result!.message, /--allow-build=deno/);\n assert.match(result!.message, /pnpm zuplo project create/);\n });\n\n it(\"returns null when bypass env var is set, even with blocked deps\", () => {\n // This is the critical regression test: with blocked deps in the\n // fixture, the ONLY way to get null is if the bypass branch fires\n // before getBlockedCriticalDeps runs. A typo in SKIP_ENV_VAR or a\n // removed early-return would cause this assertion to fail.\n writeModulesYaml(tmp, BLOCKED_MODULES_YAML);\n // Sanity: confirm the fixture is actually broken without bypass\n assert.notStrictEqual(decideAction({ _: [\"deploy\"] }, tmp), null);\n\n process.env[SKIP_ENV_VAR] = \"1\";\n assert.strictEqual(decideAction({ _: [\"deploy\"] }, tmp), null);\n });\n});\n"]}
|