@smoothbricks/nx-plugin 0.4.15 → 0.4.17

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.
Files changed (115) hide show
  1. package/README.md +17 -0
  2. package/dist/deploy-policy.d.ts +26 -0
  3. package/dist/deploy-policy.d.ts.map +1 -0
  4. package/dist/deploy-policy.js +36 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +153 -14
  7. package/dist/managed-assets.d.ts +3 -0
  8. package/dist/managed-assets.d.ts.map +1 -0
  9. package/dist/managed-assets.js +3 -0
  10. package/dist/managed-files/ci-workflow.d.ts +215 -0
  11. package/dist/managed-files/ci-workflow.d.ts.map +1 -0
  12. package/dist/managed-files/ci-workflow.js +1082 -0
  13. package/dist/managed-files/context.d.ts +51 -0
  14. package/dist/managed-files/context.d.ts.map +1 -0
  15. package/dist/managed-files/context.js +206 -0
  16. package/dist/managed-files/files.d.ts +53 -0
  17. package/dist/managed-files/files.d.ts.map +1 -0
  18. package/dist/managed-files/files.js +248 -0
  19. package/dist/managed-files/generator.d.ts +16 -0
  20. package/dist/managed-files/generator.d.ts.map +1 -0
  21. package/dist/managed-files/generator.js +41 -0
  22. package/dist/managed-files/github-runs-on.d.ts +19 -0
  23. package/dist/managed-files/github-runs-on.d.ts.map +1 -0
  24. package/dist/managed-files/github-runs-on.js +48 -0
  25. package/dist/managed-files/managed-content.d.ts +45 -0
  26. package/dist/managed-files/managed-content.d.ts.map +1 -0
  27. package/dist/managed-files/managed-content.js +102 -0
  28. package/dist/managed-files/managed-format.d.ts +37 -0
  29. package/dist/managed-files/managed-format.d.ts.map +1 -0
  30. package/dist/managed-files/managed-format.js +94 -0
  31. package/dist/managed-files/paths.d.ts +8 -0
  32. package/dist/managed-files/paths.d.ts.map +1 -0
  33. package/dist/managed-files/paths.js +46 -0
  34. package/dist/managed-files/pr-preview-cleanup-workflow.d.ts +5 -0
  35. package/dist/managed-files/pr-preview-cleanup-workflow.d.ts.map +1 -0
  36. package/dist/managed-files/pr-preview-cleanup-workflow.js +38 -0
  37. package/dist/managed-files/private-npm-policy.d.ts +7 -0
  38. package/dist/managed-files/private-npm-policy.d.ts.map +1 -0
  39. package/dist/managed-files/private-npm-policy.js +51 -0
  40. package/dist/managed-files/publish-workflow.d.ts +150 -0
  41. package/dist/managed-files/publish-workflow.d.ts.map +1 -0
  42. package/dist/managed-files/publish-workflow.js +989 -0
  43. package/dist/managed-files/tree.d.ts +30 -0
  44. package/dist/managed-files/tree.d.ts.map +1 -0
  45. package/dist/managed-files/tree.js +91 -0
  46. package/dist/platform-targets.d.ts +5 -0
  47. package/dist/platform-targets.d.ts.map +1 -0
  48. package/dist/platform-targets.js +4 -0
  49. package/dist/typecheck-test-policy.d.ts +5 -9
  50. package/dist/typecheck-test-policy.d.ts.map +1 -1
  51. package/dist/typecheck-test-policy.js +69 -99
  52. package/dist/workspace-config-policy.d.ts +2 -3
  53. package/dist/workspace-config-policy.d.ts.map +1 -1
  54. package/dist/workspace-config-policy.js +8 -3
  55. package/dist/workspace-manifest.d.ts +291 -0
  56. package/dist/workspace-manifest.d.ts.map +1 -0
  57. package/dist/workspace-manifest.js +6 -0
  58. package/dist/workspace-package-policy.d.ts +13 -0
  59. package/dist/workspace-package-policy.d.ts.map +1 -0
  60. package/dist/workspace-package-policy.js +24 -0
  61. package/generators.json +5 -0
  62. package/managed/raw/envrc +20 -0
  63. package/managed/raw/git-format-staged.yml +82 -0
  64. package/managed/raw/gitattributes +8 -0
  65. package/managed/raw/tooling/devenv +83 -0
  66. package/managed/raw/tooling/direnv/devenv.smoo.nix +422 -0
  67. package/managed/raw/tooling/direnv/github-actions-bootstrap.sh +251 -0
  68. package/managed/raw/tooling/direnv/merge-newer-pins.sh +48 -0
  69. package/managed/raw/tooling/direnv/repo-path +34 -0
  70. package/managed/raw/tooling/direnv/secret-references.ts +636 -0
  71. package/managed/raw/tooling/direnv/setup-environment.ts +585 -0
  72. package/managed/raw/tooling/direnv/toolchain-stamp.ts +88 -0
  73. package/managed/raw/tooling/git-hooks/commit-msg.sh +9 -0
  74. package/managed/raw/tooling/git-hooks/post-commit.sh +71 -0
  75. package/managed/raw/tooling/git-hooks/pre-commit.sh +18 -0
  76. package/managed/raw/tooling/git-hooks/pre-push.sh +48 -0
  77. package/managed/raw/tsconfig.lib.json +28 -0
  78. package/managed/templates/github/actions/cache-nix-devenv/action.yml +45 -0
  79. package/managed/templates/github/actions/cache-node-modules/action.yml +17 -0
  80. package/managed/templates/github/actions/cache-nx/action.yml +21 -0
  81. package/managed/templates/github/actions/cache-ttsc-plugins/action.yml +19 -0
  82. package/managed/templates/github/actions/save-nix-devenv/action.yml +32 -0
  83. package/managed/templates/github/actions/setup-devenv/action.yml +245 -0
  84. package/managed/templates/github/workflows/managed-files.yml +127 -0
  85. package/package.json +89 -5
  86. package/src/bun-bootstrap.test.ts +0 -6
  87. package/src/deploy-policy.ts +40 -0
  88. package/src/index.test.ts +225 -2
  89. package/src/index.ts +180 -14
  90. package/src/managed-assets.ts +4 -0
  91. package/src/managed-files/ci-workflow.ts +1365 -0
  92. package/src/managed-files/context.ts +240 -0
  93. package/src/managed-files/files.ts +324 -0
  94. package/src/managed-files/generator.test.ts +151 -0
  95. package/src/managed-files/generator.ts +60 -0
  96. package/src/managed-files/github-host-cache-isolation.test.ts +60 -0
  97. package/src/managed-files/github-runs-on.ts +51 -0
  98. package/src/managed-files/managed-content.test.ts +147 -0
  99. package/src/managed-files/managed-content.ts +121 -0
  100. package/src/managed-files/managed-format.ts +102 -0
  101. package/src/managed-files/paths.ts +44 -0
  102. package/src/managed-files/pr-preview-cleanup-workflow.ts +44 -0
  103. package/src/managed-files/private-npm-policy.ts +62 -0
  104. package/src/managed-files/publish-workflow.ts +1523 -0
  105. package/src/managed-files/schema.json +8 -0
  106. package/src/managed-files/tree-permissions.test.ts +109 -0
  107. package/src/managed-files/tree.test.ts +123 -0
  108. package/src/managed-files/tree.ts +118 -0
  109. package/src/platform-targets.ts +4 -0
  110. package/src/typecheck-test-policy.test.ts +28 -3
  111. package/src/typecheck-test-policy.ts +46 -121
  112. package/src/workspace-config-policy.test.ts +14 -2
  113. package/src/workspace-config-policy.ts +9 -3
  114. package/src/workspace-manifest.ts +327 -0
  115. package/src/workspace-package-policy.ts +32 -0
package/README.md CHANGED
@@ -339,3 +339,20 @@ The generator rewrites `package.json` so `nx.targets.test` uses:
339
339
  - `timeoutMs: 600000`
340
340
  - `killAfterMs: 10000`
341
341
  - package script alias `nx run <project>:test --outputStyle=stream`
342
+
343
+ ## Managed workspace files
344
+
345
+ `nx generate @smoothbricks/nx-plugin:managed-files` stages the same managed files as
346
+ `smoo monorepo update`, without installing packages or resolving secrets. Use Nx
347
+ `--dry-run` to inspect the changes. The workspace defaults register this generator
348
+ for `nx sync` and `nx sync:check`.
349
+
350
+ The plugin owns the packaged templates, pure rendering and content-preservation
351
+ functions. The generator reads workspace files through Nx `Tree` and uses Nx's
352
+ resolved project graph for inferred targets. The CLI only supplies the filesystem
353
+ and process boundary. There is no separate serialized change plan.
354
+
355
+ Files with a `# smoo-local` tail or `# smoo-local-begin` / `# smoo-local-end` blocks
356
+ retain those sections. Matching source symlinks are preserved; conflicting local
357
+ blocks and broken or external links are reported instead of overwritten. The
358
+ generator does not remove a repository-owned file when a capability is disabled.
@@ -0,0 +1,26 @@
1
+ export type DeploymentStage = 'staging' | 'production' | `pr${number}`;
2
+ /** Deployed on staging only: infrastructure the pull-request stages share. */
3
+ export declare const STAGING_DEPLOY_TAG = "staging-deploy-target";
4
+ /** Excluded from every stage deploy; deployed outside the stage flow. */
5
+ export declare const PERMANENT_DEPLOY_TAG = "permanent-deploy-target";
6
+ /** Opts a project into the generated production-on-push deploy job. */
7
+ export declare const PRODUCTION_PUSH_DEPLOY_TAG = "production-push-deploy-target";
8
+ /**
9
+ * Whether the stage flow deploys a project, from its TAGS alone — the one rule
10
+ * CI selection and workflow generation both read, so a generated deploy job and
11
+ * the projects that job deploys cannot disagree.
12
+ *
13
+ * Having a `deploy` target is not that answer. A deploy target says a project
14
+ * CAN be deployed; only a tag says CI does it. A published library ships a
15
+ * wrangler manifest to document a Durable Object binding for its consumers, and
16
+ * that manifest is structurally identical to a deployable worker's — so the
17
+ * plugin infers `deploy` from one, and a repository that deploys nothing from CI
18
+ * would otherwise generate a deploy job, with cloud credentials, for it.
19
+ *
20
+ * The three tags compose as precedence, not as a set: `permanent` excludes a
21
+ * project from every stage, `staging` narrows it to one, `stage` generalizes it
22
+ * to all. `production-push` selects WITHIN this answer (see `--select-tag`) and
23
+ * never widens it.
24
+ */
25
+ export declare function stageDeploysProject(tags: string[] | undefined, stage: DeploymentStage): boolean;
26
+ //# sourceMappingURL=deploy-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy-policy.d.ts","sourceRoot":"","sources":["../src/deploy-policy.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,YAAY,GAAG,KAAK,MAAM,EAAE,CAAC;AAKvE,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAE1D,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAE9D,uEAAuE;AACvE,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAE1E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAK/F"}
@@ -0,0 +1,36 @@
1
+ // The Nx tags that drive stage deploys. CI selection (github-ci), workflow generation (monorepo)
2
+ // and the graph readers must agree on these, so they live here rather than with any one of them.
3
+ /** Deployed on every stage: one command that deploys whichever stage it is given. */
4
+ const STAGE_DEPLOY_TAG = 'stage-deploy-target';
5
+ /** Deployed on staging only: infrastructure the pull-request stages share. */
6
+ export const STAGING_DEPLOY_TAG = 'staging-deploy-target';
7
+ /** Excluded from every stage deploy; deployed outside the stage flow. */
8
+ export const PERMANENT_DEPLOY_TAG = 'permanent-deploy-target';
9
+ /** Opts a project into the generated production-on-push deploy job. */
10
+ export const PRODUCTION_PUSH_DEPLOY_TAG = 'production-push-deploy-target';
11
+ /**
12
+ * Whether the stage flow deploys a project, from its TAGS alone — the one rule
13
+ * CI selection and workflow generation both read, so a generated deploy job and
14
+ * the projects that job deploys cannot disagree.
15
+ *
16
+ * Having a `deploy` target is not that answer. A deploy target says a project
17
+ * CAN be deployed; only a tag says CI does it. A published library ships a
18
+ * wrangler manifest to document a Durable Object binding for its consumers, and
19
+ * that manifest is structurally identical to a deployable worker's — so the
20
+ * plugin infers `deploy` from one, and a repository that deploys nothing from CI
21
+ * would otherwise generate a deploy job, with cloud credentials, for it.
22
+ *
23
+ * The three tags compose as precedence, not as a set: `permanent` excludes a
24
+ * project from every stage, `staging` narrows it to one, `stage` generalizes it
25
+ * to all. `production-push` selects WITHIN this answer (see `--select-tag`) and
26
+ * never widens it.
27
+ */
28
+ export function stageDeploysProject(tags, stage) {
29
+ if (tags === undefined)
30
+ return false;
31
+ if (tags.includes(PERMANENT_DEPLOY_TAG))
32
+ return false;
33
+ if (tags.includes(STAGING_DEPLOY_TAG))
34
+ return stage === 'staging';
35
+ return tags.includes(STAGE_DEPLOY_TAG);
36
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,aAAa,EAGnB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAKL,yBAAyB,EAa1B,MAAM,sBAAsB,CAAC;AAiB9B,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC,gEAAgE;AAChE,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AA2GlD,KAAK,gBAAgB,GAAG,OAAO,GAAG,KAAK,CAAC;AACxC,KAAK,gBAAgB,GAAG,OAAO,GAAG,OAAO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/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { existsSync } from 'node:fs';
1
+ import { existsSync, realpathSync } from 'node:fs';
2
2
  import { readdir, readFile } from 'node:fs/promises';
3
3
  import { createRequire } from 'node:module';
4
- import { dirname, join, posix, relative } from 'node:path';
4
+ import { dirname, isAbsolute, join, posix, relative, resolve } from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { readJsonFile, } from 'nx/src/devkit-exports.js';
7
7
  import { AggregateCreateNodesError } from 'nx/src/project-graph/error-types.js';
@@ -20,14 +20,18 @@ export const DEPLOY_TARGET = 'deploy';
20
20
  export const DEPLOY_BUILD_TARGET = 'deploy-build';
21
21
  /** The workspace-wide manifests a release rewrites: the version of every member, and the lockfile mirror of it. */
22
22
  const RELEASE_REWRITTEN_WORKSPACE_INPUTS = ['{workspaceRoot}/package.json', '{workspaceRoot}/bun.lock'];
23
- const TYPESCRIPT_TOOLCHAIN_INPUTS = [
24
- ...RELEASE_REWRITTEN_WORKSPACE_INPUTS,
25
- '{workspaceRoot}/patches/**/*',
26
- '{workspaceRoot}/tsconfig.base.json',
27
- ];
23
+ /** Installed-toolchain files a TypeScript task reads that no config can name. */
24
+ const TYPESCRIPT_PATCH_INPUTS = ['{workspaceRoot}/patches/**/*'];
25
+ /**
26
+ * The workspace's own base config, hashed for every TypeScript task whether or
27
+ * not this project's chain reaches it: it is where a workspace puts the options
28
+ * it means to apply to everything, and a project with no TypeScript config of
29
+ * its own has no chain to reach it with.
30
+ */
31
+ const WORKSPACE_TSCONFIG_BASE_INPUT = '{workspaceRoot}/tsconfig.base.json';
28
32
  /**
29
- * The same toolchain for a check, with the two release-rewritten files hashed
30
- * by field instead of by byte.
33
+ * The two release-rewritten files hashed by field instead of by byte, for a
34
+ * check that only reads them.
31
35
  *
32
36
  * A `json` input is hashed by Nx's own hasher, so this costs no process. The
33
37
  * lockfile's `workspaces` section is the mirror of each member's manifest —
@@ -35,11 +39,138 @@ const TYPESCRIPT_TOOLCHAIN_INPUTS = [
35
39
  * hashed from the member's own `package.json`. Dropping that section keeps the
36
40
  * resolution table, which is the reason the lockfile is an input at all.
37
41
  */
38
- const VERSIONLESS_TOOLCHAIN_INPUTS = [
39
- ...TYPESCRIPT_TOOLCHAIN_INPUTS.filter((input) => !RELEASE_REWRITTEN_WORKSPACE_INPUTS.includes(input)),
42
+ const VERSIONLESS_TOOLCHAIN_MANIFEST_INPUTS = [
40
43
  { json: '{workspaceRoot}/package.json', excludeFields: ['version'] },
41
44
  { json: '{workspaceRoot}/bun.lock', excludeFields: ['workspaces'] },
42
45
  ];
46
+ /** A path segment Nx's workspace file map never carries, so a fileset naming it hashes nothing. */
47
+ const NODE_MODULES_SEGMENT = /(?:^|\/)node_modules(?:\/|$)/;
48
+ /**
49
+ * Every config file whose compiler options decide this project's TypeScript
50
+ * verdicts: the workspace base, plus every file reachable by `extends` from the
51
+ * configs its commands hand to `tsc`.
52
+ *
53
+ * Hashing only the named config is the bug this closes. A workspace whose
54
+ * project configs extend an INTERMEDIATE base — `packages/tsconfig.base.json`
55
+ * extending the root one — hashed the root and the named file and nothing in
56
+ * between, so flipping `noUnusedLocals` in the intermediate left every
57
+ * typecheck, test typecheck and emit serving its previous answer from cache:
58
+ * a pass for sources the compiler would now reject.
59
+ *
60
+ * Fail-closed. An `extends` that resolves to no file throws and names both
61
+ * files, because the only alternative is to drop an ancestor from the hash —
62
+ * which is the silence above. The ancestors this cannot name as a fileset are
63
+ * the two kinds Nx has no fileset for; see {@link configChainInput}.
64
+ */
65
+ function typescriptConfigChainInputs(configPaths, workspaceRoot) {
66
+ const inputs = new Set([WORKSPACE_TSCONFIG_BASE_INPUT]);
67
+ const walked = new Set();
68
+ for (const configPath of configPaths) {
69
+ addTypescriptConfigAncestors(configPath, workspaceRoot, inputs, walked);
70
+ }
71
+ return [...inputs];
72
+ }
73
+ /**
74
+ * One config's ancestors; `walked` both dedupes shared bases and breaks an
75
+ * `extends` cycle.
76
+ *
77
+ * The walk stops at an ancestor Nx cannot hash, because everything reachable
78
+ * from an installed config is installed too: the lockfile pins that whole
79
+ * subtree, and parsing it could only invent failures for a dependency's own
80
+ * chain.
81
+ */
82
+ function addTypescriptConfigAncestors(configPath, workspaceRoot, inputs, walked) {
83
+ if (walked.has(configPath))
84
+ return;
85
+ walked.add(configPath);
86
+ for (const specifier of typescriptConfigExtends(configPath)) {
87
+ const ancestor = resolveTypescriptConfigExtends(specifier, configPath);
88
+ const input = configChainInput(ancestor, configPath, workspaceRoot);
89
+ if (input === null)
90
+ continue;
91
+ inputs.add(input);
92
+ addTypescriptConfigAncestors(ancestor.path, workspaceRoot, inputs, walked);
93
+ }
94
+ }
95
+ /** What one config extends: a single specifier, or the ordered list TypeScript 5.0 added. */
96
+ function typescriptConfigExtends(configPath) {
97
+ const config = readJsonFile(configPath, { expectComments: true });
98
+ if (!isRecord(config))
99
+ throw new Error(`${configPath} is not a TypeScript configuration object`);
100
+ const extended = config.extends;
101
+ if (extended === undefined)
102
+ return [];
103
+ const specifiers = Array.isArray(extended) ? extended : [extended];
104
+ return specifiers.map((specifier) => {
105
+ if (typeof specifier !== 'string' || specifier.length === 0) {
106
+ throw new Error(`${configPath}: "extends" must name config files, not ${JSON.stringify(extended)}`);
107
+ }
108
+ return specifier;
109
+ });
110
+ }
111
+ /**
112
+ * One `extends` specifier as an absolute path, by TypeScript's own rules: a
113
+ * relative or rooted specifier is a path — with the `.json` extension it may
114
+ * omit — and anything else is a Node specifier resolved from the extending file.
115
+ */
116
+ function resolveTypescriptConfigExtends(specifier, fromConfigPath) {
117
+ if (specifier.startsWith('./') || specifier.startsWith('../') || isAbsolute(specifier)) {
118
+ const direct = resolve(dirname(fromConfigPath), specifier);
119
+ const candidates = direct.endsWith('.json') ? [direct] : [direct, `${direct}.json`];
120
+ const found = candidates.find((candidate) => existsSync(candidate));
121
+ if (found !== undefined)
122
+ return { path: found, installed: false };
123
+ throw new Error(`${fromConfigPath}: "extends": "${specifier}" names no file (looked for ${candidates.join(', ')}). ` +
124
+ 'Every config in the chain is hashed, so one that cannot be found cannot be left out of the hash either.');
125
+ }
126
+ // A package config may be named by file or bare; TypeScript accepts both.
127
+ const candidates = specifier.endsWith('.json') ? [specifier] : [specifier, `${specifier}/tsconfig.json`];
128
+ const nodeRequire = createRequire(fromConfigPath);
129
+ for (const candidate of candidates) {
130
+ try {
131
+ return { path: nodeRequire.resolve(candidate), installed: true };
132
+ }
133
+ catch {
134
+ // Not this spelling of the package config; try the next, then refuse.
135
+ }
136
+ }
137
+ throw new Error(`${fromConfigPath}: "extends": "${specifier}" resolves to no installed config (tried ${candidates.join(', ')}). ` +
138
+ 'Every config in the chain is hashed, so one that cannot be found cannot be left out of the hash either.');
139
+ }
140
+ /**
141
+ * The fileset name for one ancestor, or `null` when Nx cannot hash that file.
142
+ *
143
+ * Nx hashes workspace files that are not in node_modules, so two ancestor
144
+ * kinds cannot be named — and they are not the same thing:
145
+ *
146
+ * - a dependency's config: `bun.lock` and the root manifest decide which
147
+ * bytes are installed, and both are already inputs. Where they sit is the
148
+ * installer's business — bun keeps them in a global store outside the
149
+ * workspace entirely — so this is settled by HOW the specifier resolved,
150
+ * not by where it landed. A workspace member reached through its package
151
+ * name is workspace source, and is hashed as such.
152
+ * - a path above the workspace root: nothing hashes it and nothing pins it,
153
+ * so an edit there really can serve a stale verdict. Said out loud,
154
+ * because the silent version of exactly that is the bug this walk closes.
155
+ */
156
+ function configChainInput(ancestor, fromConfigPath, workspaceRoot) {
157
+ let relativePath = relative(workspaceRoot, ancestor.path).replaceAll('\\', '/');
158
+ if (relativePath.startsWith('../')) {
159
+ // Node resolves a package to its REAL path, and a workspace root can itself
160
+ // be reached through a symlink (macOS `/var` → `/private/var`): a workspace
161
+ // member then looks like a file above the root. Believe the real root
162
+ // before concluding anything is outside.
163
+ relativePath = relative(realpathSync(workspaceRoot), ancestor.path).replaceAll('\\', '/');
164
+ }
165
+ const outsideWorkspace = relativePath.length === 0 || relativePath.startsWith('../') || isAbsolute(relativePath);
166
+ if (!outsideWorkspace && !NODE_MODULES_SEGMENT.test(relativePath))
167
+ return `{workspaceRoot}/${relativePath}`;
168
+ if (!ancestor.installed) {
169
+ process.stderr.write(`@smoothbricks/nx-plugin: ${fromConfigPath} extends ${ancestor.path}, which is outside the workspace. ` +
170
+ 'Nx hashes workspace files only, so a change to it will not invalidate this project\u2019s TypeScript tasks.\n');
171
+ }
172
+ return null;
173
+ }
43
174
  /**
44
175
  * A project's own manifest, hashed without the version a release rewrites.
45
176
  *
@@ -658,6 +789,8 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
658
789
  const validationTargets = [];
659
790
  const libTsconfigPath = join(absoluteProjectRoot, 'tsconfig.lib.json');
660
791
  const hasLibTsconfig = existsSync(libTsconfigPath);
792
+ const testTsconfigPath = join(absoluteProjectRoot, 'tsconfig.test.json');
793
+ const hasTestTsconfig = existsSync(testTsconfigPath);
661
794
  const cargoTomlPath = join(absoluteProjectRoot, 'Cargo.toml');
662
795
  const isCargoWorkspace = existsSync(cargoTomlPath) && CARGO_WORKSPACE_PATTERN.test(await readFile(cargoTomlPath, 'utf-8'));
663
796
  const cargoWorkspace = cargoWorkspaces.find((workspace) => workspace.projectRoot === projectRoot) ??
@@ -675,7 +808,14 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
675
808
  const hasCrateManifests = isCargoProject || existsSync(cargoTomlPath);
676
809
  const crateInputs = versionless !== null && hasCrateManifests ? await versionlessCrateInputs(projectRoot, workspaceRoot) : [];
677
810
  const versionlessProjectInputs = versionless === null ? [] : [...VERSIONLESS_PACKAGE_INPUTS, ...crateInputs];
678
- const checkInputs = versionless === null ? TYPESCRIPT_TOOLCHAIN_INPUTS : VERSIONLESS_TOOLCHAIN_INPUTS;
811
+ // The options a TypeScript task's answer really depends on, which is the
812
+ // whole `extends` chain of the configs its commands name and not just those
813
+ // two files. Resolved once per project: every target below shares it.
814
+ const typescriptConfigChain = typescriptConfigChainInputs([...(hasLibTsconfig ? [libTsconfigPath] : []), ...(hasTestTsconfig ? [testTsconfigPath] : [])], workspaceRoot);
815
+ const toolchainInputs = [...RELEASE_REWRITTEN_WORKSPACE_INPUTS, ...TYPESCRIPT_PATCH_INPUTS, ...typescriptConfigChain];
816
+ const checkInputs = versionless === null
817
+ ? toolchainInputs
818
+ : [...TYPESCRIPT_PATCH_INPUTS, ...typescriptConfigChain, ...VERSIONLESS_TOOLCHAIN_MANIFEST_INPUTS];
679
819
  const selfProduction = versionless === null ? 'production' : VERSIONLESS_PRODUCTION_INPUT;
680
820
  const selfDefault = versionless === null ? 'default' : VERSIONLESS_DEFAULT_INPUT;
681
821
  const dependencyProduction = versionless?.transitive === true
@@ -702,7 +842,7 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
702
842
  targets['tsc-js'] = {
703
843
  executor: '@smoothbricks/nx-plugin:typescript-emit',
704
844
  cache: true,
705
- inputs: ['production', '^production', ...TYPESCRIPT_TOOLCHAIN_INPUTS, '{projectRoot}/tsconfig.lib.json'],
845
+ inputs: ['production', '^production', ...toolchainInputs, '{projectRoot}/tsconfig.lib.json'],
706
846
  outputs: inferTypescriptOutputs(libTsconfigPath, packageJsonPath),
707
847
  dependsOn: ['^*-js', ...(cargoWasmConfig ? ['cargo-wasm'] : [])],
708
848
  options: {
@@ -723,7 +863,6 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
723
863
  },
724
864
  };
725
865
  }
726
- const hasTestTsconfig = existsSync(join(absoluteProjectRoot, 'tsconfig.test.json'));
727
866
  if (hasTestTsconfig) {
728
867
  targets['typecheck-tests'] = {
729
868
  executor: 'nx:run-commands',
@@ -0,0 +1,3 @@
1
+ /** Packaged assets, independent of the consumer's cwd and node_modules layout. */
2
+ export declare const managedAssetsRoot: string;
3
+ //# sourceMappingURL=managed-assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"managed-assets.d.ts","sourceRoot":"","sources":["../src/managed-assets.ts"],"names":[],"mappings":"AAEA,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,QAAyD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { fileURLToPath } from 'node:url';
2
+ /** Packaged assets, independent of the consumer's cwd and node_modules layout. */
3
+ export const managedAssetsRoot = fileURLToPath(new URL('../managed/', import.meta.url));
@@ -0,0 +1,215 @@
1
+ import type { NonEmptyArray, PackageCargoCredentialsConfig, PackagePrivateNpmConfig, PackageRemoteCacheConfig, PackageSmooGithub, PackageSmooGithubEnvironments, PackageSourceCheckoutConfig } from '../workspace-manifest.js';
2
+ export declare enum CiWorkflowStepKind {
3
+ Checkout = "checkout",
4
+ SourceCheckouts = "source-checkouts",
5
+ SetupDevenv = "setup-devenv",
6
+ CargoCredentials = "cargo-credentials",
7
+ SetNxShas = "set-nx-shas",
8
+ RestoreNxCache = "restore-nx-cache",
9
+ Build = "build",
10
+ BrowserTests = "browser-tests",
11
+ Lint = "lint",
12
+ UnitTests = "unit-tests",
13
+ CrossToolchainPreflight = "cross-toolchain-preflight",
14
+ CrossTestArchives = "cross-test-archives",
15
+ UploadCrossTestArchives = "upload-cross-test-archives",
16
+ DownloadCrossTestArchives = "download-cross-test-archives",
17
+ CrossTests = "cross-tests",
18
+ ManagedFilesCheck = "managed-files-check",
19
+ ManagedFilesDispatch = "managed-files-dispatch",
20
+ Deploy = "deploy",
21
+ SaveNxCache = "save-nx-cache",
22
+ UploadTraceDbs = "upload-trace-dbs",
23
+ SaveNixDevenv = "save-nix-devenv"
24
+ }
25
+ export interface CiWorkflowStep {
26
+ kind: CiWorkflowStepKind;
27
+ name: string;
28
+ number: number;
29
+ }
30
+ /**
31
+ * What a deploy step needs to authenticate, as declared configuration. Both
32
+ * workflow generators deploy production with the same credentials, so the
33
+ * declaration and its rendering live here once: a repo that declares
34
+ * `smoo.github.deploySecrets` gets them wherever a managed workflow deploys,
35
+ * not only on CI's stage deploy.
36
+ */
37
+ export interface DeployStepSecretConfig {
38
+ deployProvider?: 'cloudflare';
39
+ /** Extra deploy-step secrets, env var name → repository secret name. */
40
+ deploySecrets?: Record<string, string>;
41
+ }
42
+ /**
43
+ * One foreign target triple's test archive: what the Linux job cross-builds and
44
+ * a native runner executes.
45
+ *
46
+ * Both fields are DERIVED, never hand-written: the triple comes from the cargo
47
+ * workspace's `[workspace.metadata.smoothbricks.test] cross-targets`, and the
48
+ * path is where the inferred `cargo-cross-test-archive-<triple>` target
49
+ * declares its output. That is why this is not a `smoo.github` key — a triple
50
+ * repeated in CI config could name an archive the graph cannot build, and the
51
+ * workflow would only find out on the runner.
52
+ */
53
+ export interface CiCrossTestArchive {
54
+ triple: string;
55
+ /** Repository-relative path of the archive file, from the target's output. */
56
+ path: string;
57
+ }
58
+ export interface CiWorkflowDefinitionOptions extends DeployStepSecretConfig {
59
+ actionsProvider?: PackageSmooGithub['actionsProvider'];
60
+ deploy: boolean;
61
+ browserTests: boolean;
62
+ e2eDeployment: boolean;
63
+ /** The first entry is the branch whose pushes deploy the staging stage. */
64
+ pushBranches: NonEmptyArray<string>;
65
+ /** Default ubuntu-latest when omitted. */
66
+ runsOn?: string | string[];
67
+ /**
68
+ * Declared private-npm opt-in. Exposes the read token to the installing job
69
+ * before SetupDevenv so `.npmrc` `${TOKEN}` expansion can run, and skips
70
+ * fork PRs, which never receive secrets. The registry URL lives in `.npmrc`,
71
+ * not job env. Publish tokens never belong here.
72
+ */
73
+ privateNpm?: PackagePrivateNpmConfig;
74
+ /**
75
+ * Declared sibling source checkouts (package.json `smoo.github.sourceCheckouts`).
76
+ * Cloned beside the main checkout before SetupDevenv so path dependencies
77
+ * resolve exactly as in the developer workspace. Absent means none.
78
+ */
79
+ sourceCheckouts?: PackageSourceCheckoutConfig[];
80
+ /**
81
+ * Declared Cargo private-dependency credentials
82
+ * (package.json `smoo.github.cargoCredentials`). Registry tokens ride the
83
+ * job env; private git origins get a host-gated credential helper installed
84
+ * before SetupDevenv. Absent means no private Cargo fetch.
85
+ */
86
+ cargoCredentials?: PackageCargoCredentialsConfig;
87
+ /**
88
+ * Declared self-hosted Nx remote cache (package.json `smoo.remoteCache`).
89
+ * Every job that runs Nx carries the server and the access token, so one
90
+ * cache serves the whole fleet. Absent means each runner caches locally.
91
+ */
92
+ remoteCache?: PackageRemoteCacheConfig;
93
+ /** GitHub Environments: staging for the validate/e2e jobs, production for the production-on-push job. */
94
+ environments?: PackageSmooGithubEnvironments;
95
+ /** Secrets for the e2e-deployment step, env var name → repository secret name. */
96
+ e2eSecrets?: Record<string, string>;
97
+ /** Emit the production-on-push job (some project carries PRODUCTION_PUSH_DEPLOY_TAG). */
98
+ productionOnPush?: boolean;
99
+ /**
100
+ * Cross-built test archives, one per foreign target triple the cargo
101
+ * workspace declares. The Linux job builds and uploads each one; a second job
102
+ * downloads the `*-apple-darwin` ones and EXECUTES them on `macosRunsOn`,
103
+ * which is how a cross compile gets proved by running rather than by linking.
104
+ *
105
+ * Empty or absent renders exactly what a repository without cross archives
106
+ * renders — no step, no job, no numbering shift.
107
+ */
108
+ crossTestArchives?: readonly CiCrossTestArchive[];
109
+ /**
110
+ * macOS runner labels for the darwin execution job
111
+ * (`smoo.github.macosRunsOn`, the same labels the publish workflow's macOS
112
+ * legs use). Default macos-latest.
113
+ *
114
+ * A self-hosted label here is one specific machine. That machine being asleep
115
+ * does not skip the job: it queues, and the run FAILS on the job's
116
+ * `timeout-minutes`. That is the trade this opt-in buys — a red run when the
117
+ * Mac is unreachable, in exchange for the darwin binaries being tested by
118
+ * execution at all. `continue-on-error` would buy the green back by making
119
+ * the job unable to report anything, which is worse than not having it.
120
+ */
121
+ macosRunsOn?: string | string[];
122
+ /**
123
+ * Declared Linux cross-platform producer (`smoo.github.platformProducer`):
124
+ * the toolchain preflight and the environment a foreign-target build needs on
125
+ * a Linux runner. The publish workflow already renders this declaration for
126
+ * its cross artifact job, so the cross test archive reuses it rather than
127
+ * carrying a second copy of one repository's SDK and linker setup.
128
+ *
129
+ * Rendered STEP-scoped here, never as job env: this environment turns the
130
+ * repository's native producers into cross producers, and Validate's other
131
+ * steps are host builds that must stay host builds.
132
+ */
133
+ platformProducer?: PackageSmooGithub['platformProducer'];
134
+ }
135
+ export declare function defineCiWorkflow(options: CiWorkflowDefinitionOptions): CiWorkflowStep[];
136
+ export declare function renderCiWorkflowYaml(options: CiWorkflowDefinitionOptions): string;
137
+ /** Job env for `.npmrc` token expansion. Registry URL is not a GitHub variable. */
138
+ export declare function privateNpmReadTokenJobEnv(options: Pick<CiWorkflowDefinitionOptions, 'privateNpm'>): string;
139
+ /**
140
+ * One clone command per declared sibling source, pinned to its configured
141
+ * ref. The step's `if` keeps fork PRs — which receive no secrets — from
142
+ * touching source-read credentials, and their builds would lack the private
143
+ * siblings anyway. The clone URL stays clean: authorization rides per git
144
+ * command through `GIT_CONFIG_*` environment config whose
145
+ * `http.<origin>.extraheader` key names the exact origin, so the token never
146
+ * reaches argv, a file, the sibling's stored `.git/config`, or any other
147
+ * host. The token itself is only ever a shell expansion of the step env.
148
+ */
149
+ export declare function sourceCheckoutsStepLines(step: CiWorkflowStep, checkouts: readonly PackageSourceCheckoutConfig[]): string[];
150
+ /** Mechanism errors surface at managed-file render time, never inside CI. */
151
+ export declare function normalizeSourceCheckout(config: PackageSourceCheckoutConfig): PackageSourceCheckoutConfig;
152
+ /**
153
+ * Job env lines carrying the declared Nx remote cache. The pair rides the job
154
+ * env rather than a step because every Nx invocation in the job — build, lint,
155
+ * tests, deploy — reads it, and Nx enables the cache on a nonempty server
156
+ * alone: an empty or absent token would make it authenticate with nothing and
157
+ * fail every task on 401, which is why the job carries the same fork-PR gate
158
+ * as a private dependency install (see `renderCiWorkflowHeader`).
159
+ *
160
+ * A declared `internalServer` is the address managed runners use, exactly as a
161
+ * git origin's `internalMirror` is: both say this repository's runners sit
162
+ * inside that network, and shells outside it keep the public origin.
163
+ * Mechanism errors surface at managed-file render time, never inside CI.
164
+ */
165
+ export declare function remoteCacheJobEnvLines(config: PackageRemoteCacheConfig | undefined): string;
166
+ /** Mechanism errors surface at managed-file render time, never inside CI. */
167
+ export declare function normalizeRemoteCache(config: PackageRemoteCacheConfig): PackageRemoteCacheConfig;
168
+ /**
169
+ * Job env lines carrying the declared Cargo credential secrets. Both registry
170
+ * tokens and git-origin tokens ride the job env so the credential helper is
171
+ * still in scope when cargo spawns git much later in the build. Fork PRs
172
+ * receive empty values and skip the helper step, so nothing answers for a
173
+ * private origin there.
174
+ */
175
+ export declare function cargoCredentialJobEnvLines(config: PackageCargoCredentialsConfig | undefined): string;
176
+ /**
177
+ * The credential-transport step preflights every declared token, then writes a
178
+ * host-gated helper script into `$RUNNER_TEMP` for git origins and points the
179
+ * per-process `GIT_CONFIG_*` environment at it through GITHUB_ENV, plus
180
+ * `CARGO_NET_GIT_FETCH_WITH_CLI` so Cargo shells out to git. Runners whose
181
+ * egress requires a proxy export it as `HTTP(S)_PROXY`, which cargo honors
182
+ * natively but git never reads, so the step mirrors it into git config or
183
+ * Cargo git fetches bypass the proxy and fail to connect. Origins with an
184
+ * `internalMirror` are rewritten to the mirror with `url.<mirror>.insteadOf`
185
+ * and the helper answers the same credential for the mirror's host, since git
186
+ * passes helpers the rewritten URL. The helper reads the environment at call
187
+ * time and answers only for declared origins. Declared `sshOrigins` rewrite
188
+ * onto the same mirror and stay credential-free: the rewrite happens before
189
+ * transport, so git only ever asks for the mirror, and an SSH pin the runner
190
+ * has no key for fails loudly instead of collecting a token.
191
+ * Mechanism errors surface at managed-file render time, never inside CI.
192
+ */
193
+ export declare function cargoCredentialStepLines(step: CiWorkflowStep, config: PackageCargoCredentialsConfig): string[];
194
+ /** Mechanism errors surface at managed-file render time, never inside CI. */
195
+ export declare function normalizeCargoCredentials(config: PackageCargoCredentialsConfig): PackageCargoCredentialsConfig;
196
+ /**
197
+ * The same-repo gate as prettier folds it: the raw single line exceeds the
198
+ * print width, so the generator emits the folded form itself to keep the
199
+ * checked-in managed output byte-identical across regeneration and hooks.
200
+ */
201
+ export declare const SAME_REPO_GATE_FOLDED: string[];
202
+ /**
203
+ * The step-scoped `env:` block for a deploy step. Step scope is the property
204
+ * being rendered, not an accident of indentation: job env would hand the
205
+ * deployment credentials to every other step in that job — checkout, setup,
206
+ * build, and in the publish workflow the pending-release repair and the npm
207
+ * publish itself.
208
+ *
209
+ * An explicit declaration wins over the provider default, so a repo whose
210
+ * Cloudflare credentials live under different repository secret names says so
211
+ * once in `deploySecrets` instead of being overridden here.
212
+ */
213
+ export declare function deployStepSecretEnvLines(config: DeployStepSecretConfig): string[];
214
+ export declare function artifactStepLines(provider: PackageSmooGithub['actionsProvider'], name: string, kind: 'upload' | 'download', inputs: readonly string[], condition?: string): string[];
215
+ //# sourceMappingURL=ci-workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-workflow.d.ts","sourceRoot":"","sources":["../../src/managed-files/ci-workflow.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,aAAa,EACb,6BAA6B,EAE7B,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,6BAA6B,EAC7B,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAGlC,oBAAY,kBAAkB;IAC5B,QAAQ,aAAa;IACrB,eAAe,qBAAqB;IACpC,WAAW,iBAAiB;IAC5B,gBAAgB,sBAAsB;IACtC,SAAS,gBAAgB;IACzB,cAAc,qBAAqB;IACnC,KAAK,UAAU;IACf,YAAY,kBAAkB;IAC9B,IAAI,SAAS;IACb,SAAS,eAAe;IACxB,uBAAuB,8BAA8B;IACrD,iBAAiB,wBAAwB;IACzC,uBAAuB,+BAA+B;IACtD,yBAAyB,iCAAiC;IAC1D,UAAU,gBAAgB;IAC1B,iBAAiB,wBAAwB;IACzC,oBAAoB,2BAA2B;IAC/C,MAAM,WAAW;IACjB,WAAW,kBAAkB;IAC7B,cAAc,qBAAqB;IACnC,aAAa,oBAAoB;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;C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