@nx/docker 23.0.0-pr.35465.2bc2643 → 23.0.0-rc.1

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 (41) hide show
  1. package/{generators.d.ts → dist/generators.d.ts} +0 -1
  2. package/dist/index.d.ts +1 -0
  3. package/{index.js → dist/index.js} +2 -1
  4. package/{src → dist/src}/executors/release-publish/release-publish.impl.d.ts +0 -1
  5. package/{src → dist/src}/generators/init/init.d.ts +0 -1
  6. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.d.ts +9 -0
  7. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.js +223 -0
  8. package/{src → dist/src}/plugins/plugin.d.ts +6 -3
  9. package/{src → dist/src}/plugins/plugin.js +16 -16
  10. package/{src → dist/src}/release/version-pattern-utils.d.ts +0 -1
  11. package/{src → dist/src}/release/version-utils.d.ts +0 -1
  12. package/{src → dist/src}/release/version-utils.js +10 -1
  13. package/{src → dist/src}/utils/interpolate-pattern.d.ts +0 -1
  14. package/dist/src/utils/versions.d.ts +1 -0
  15. package/dist/src/utils/versions.js +5 -0
  16. package/executors.json +2 -2
  17. package/generators.json +2 -2
  18. package/migrations.json +10 -1
  19. package/package.json +53 -19
  20. package/generators.d.ts.map +0 -1
  21. package/index.d.ts +0 -2
  22. package/index.d.ts.map +0 -1
  23. package/src/executors/release-publish/release-publish.impl.d.ts.map +0 -1
  24. package/src/generators/init/init.d.ts.map +0 -1
  25. package/src/plugins/plugin.d.ts.map +0 -1
  26. package/src/release/version-pattern-utils.d.ts.map +0 -1
  27. package/src/release/version-utils.d.ts.map +0 -1
  28. package/src/utils/interpolate-pattern.d.ts.map +0 -1
  29. package/src/utils/versions.d.ts +0 -2
  30. package/src/utils/versions.d.ts.map +0 -1
  31. package/src/utils/versions.js +0 -4
  32. /package/{LICENSE → dist/LICENSE} +0 -0
  33. /package/{generators.js → dist/generators.js} +0 -0
  34. /package/{src → dist/src}/executors/release-publish/release-publish.impl.js +0 -0
  35. /package/{src → dist/src}/executors/release-publish/schema.d.ts +0 -0
  36. /package/{src → dist/src}/executors/release-publish/schema.json +0 -0
  37. /package/{src → dist/src}/generators/init/init.js +0 -0
  38. /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
  39. /package/{src → dist/src}/generators/init/schema.json +0 -0
  40. /package/{src → dist/src}/release/version-pattern-utils.js +0 -0
  41. /package/{src → dist/src}/utils/interpolate-pattern.js +0 -0
@@ -1,2 +1 @@
1
1
  export * from './src/generators/init/init';
2
- //# sourceMappingURL=generators.d.ts.map
@@ -0,0 +1 @@
1
+ export { createNodes, createNodesV2, DockerPluginOptions, } from './src/plugins/plugin';
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createNodesV2 = void 0;
3
+ exports.createNodesV2 = exports.createNodes = void 0;
4
4
  var plugin_1 = require("./src/plugins/plugin");
5
+ Object.defineProperty(exports, "createNodes", { enumerable: true, get: function () { return plugin_1.createNodes; } });
5
6
  Object.defineProperty(exports, "createNodesV2", { enumerable: true, get: function () { return plugin_1.createNodesV2; } });
@@ -9,4 +9,3 @@ export declare const LARGE_BUFFER: number;
9
9
  export default function dockerReleasePublish(schema: DockerReleasePublishSchema, context: ExecutorContext): Promise<{
10
10
  success: boolean;
11
11
  }>;
12
- //# sourceMappingURL=release-publish.impl.d.ts.map
@@ -3,4 +3,3 @@ import { InitGeneratorSchema } from './schema';
3
3
  export declare function updateDependencies(tree: Tree, schema: InitGeneratorSchema): GeneratorCallback;
4
4
  export declare function initGenerator(tree: Tree, schema: InitGeneratorSchema): Promise<GeneratorCallback>;
5
5
  export default initGenerator;
6
- //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ export default function migrateCreateNodesV2ToCreateNodes(tree: Tree): Promise<void>;
3
+ /**
4
+ * Rewrites named imports and re-exports of `createNodesV2` to `createNodes`
5
+ * when they come from one of the given module specifiers. Only the named
6
+ * bindings are touched — the module specifier, the `import`/`export` keyword,
7
+ * any `type` modifier, and any default import are left untouched.
8
+ */
9
+ export declare function rewriteCreateNodesV2Imports(source: string, specifiers: ReadonlySet<string>): string;
@@ -0,0 +1,223 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = migrateCreateNodesV2ToCreateNodes;
4
+ exports.rewriteCreateNodesV2Imports = rewriteCreateNodesV2Imports;
5
+ const devkit_1 = require("@nx/devkit");
6
+ const TS_EXTENSIONS = ['.ts', '.tsx', '.cts', '.mts'];
7
+ const DEPRECATED_NAME = 'createNodesV2';
8
+ const CANONICAL_NAME = 'createNodes';
9
+ // Module specifiers from which `@nx/docker` publicly exposes `createNodesV2`.
10
+ // A named import or re-export of `createNodesV2` from one of these is rewritten
11
+ // to the canonical `createNodes` export.
12
+ const TARGET_SPECIFIERS = new Set(['@nx/docker']);
13
+ let ts;
14
+ async function migrateCreateNodesV2ToCreateNodes(tree) {
15
+ let touchedCount = 0;
16
+ (0, devkit_1.visitNotIgnoredFiles)(tree, '.', (filePath) => {
17
+ if (!TS_EXTENSIONS.some((ext) => filePath.endsWith(ext))) {
18
+ return;
19
+ }
20
+ const original = tree.read(filePath, 'utf-8');
21
+ if (!original || !original.includes(DEPRECATED_NAME)) {
22
+ return;
23
+ }
24
+ const updated = rewriteCreateNodesV2Imports(original, TARGET_SPECIFIERS);
25
+ if (updated !== original) {
26
+ tree.write(filePath, updated);
27
+ touchedCount += 1;
28
+ }
29
+ });
30
+ if (touchedCount > 0) {
31
+ devkit_1.logger.info(`Renamed \`${DEPRECATED_NAME}\` imports to \`${CANONICAL_NAME}\` in ${touchedCount} file(s).`);
32
+ }
33
+ await (0, devkit_1.formatFiles)(tree);
34
+ }
35
+ /**
36
+ * Rewrites named imports and re-exports of `createNodesV2` to `createNodes`
37
+ * when they come from one of the given module specifiers. Only the named
38
+ * bindings are touched — the module specifier, the `import`/`export` keyword,
39
+ * any `type` modifier, and any default import are left untouched.
40
+ */
41
+ function rewriteCreateNodesV2Imports(source, specifiers) {
42
+ ts ??= (0, devkit_1.ensurePackage)('typescript', '*');
43
+ const sourceFile = ts.createSourceFile('tmp.ts', source, ts.ScriptTarget.Latest,
44
+ /* setParentNodes */ true, ts.ScriptKind.TSX);
45
+ const changes = [];
46
+ let renameLocalUsages = false;
47
+ for (const stmt of sourceFile.statements) {
48
+ if (ts.isImportDeclaration(stmt)) {
49
+ renameLocalUsages =
50
+ collectImportRewrite(sourceFile, stmt, specifiers, changes) ||
51
+ renameLocalUsages;
52
+ }
53
+ else if (ts.isExportDeclaration(stmt)) {
54
+ collectExportRewrite(sourceFile, stmt, specifiers, changes);
55
+ }
56
+ }
57
+ // Renaming a local `createNodesV2` import binding to `createNodes` (a lone
58
+ // `{ createNodesV2 }`, or one deduped against an existing `createNodes`)
59
+ // changes the name in scope, so value references to `createNodesV2` in the
60
+ // file body must be renamed too — otherwise they dangle. Aliased imports and
61
+ // re-exports keep their local name, so they never trigger this.
62
+ if (renameLocalUsages) {
63
+ collectValueUsageRewrites(sourceFile, changes);
64
+ }
65
+ return changes.length > 0 ? (0, devkit_1.applyChangesToString)(source, changes) : source;
66
+ }
67
+ function isTargetSpecifier(node, specifiers) {
68
+ return ts.isStringLiteral(node) && specifiers.has(node.text);
69
+ }
70
+ function collectImportRewrite(sourceFile, stmt, specifiers, changes) {
71
+ if (!isTargetSpecifier(stmt.moduleSpecifier, specifiers)) {
72
+ return false;
73
+ }
74
+ const namedBindings = stmt.importClause?.namedBindings;
75
+ // Only `import { ... }` carries renameable named bindings. `import x`,
76
+ // `import * as ns`, and side-effect imports reference the module wholesale
77
+ // and keep working through the `createNodesV2` runtime alias, so we leave
78
+ // them be. A mixed `import def, { createNodesV2 }` still has its named
79
+ // bindings rewritten below — the default binding is untouched.
80
+ if (!namedBindings || !ts.isNamedImports(namedBindings)) {
81
+ return false;
82
+ }
83
+ // The local `createNodesV2` binding only disappears when it is imported
84
+ // without an alias — a lone `{ createNodesV2 }` or one deduped against an
85
+ // existing `createNodes`. `{ createNodesV2 as x }` keeps the local `x`, so
86
+ // its in-file usages are unaffected and must not be rewritten.
87
+ const localBindingRenamed = namedBindings.elements.some((el) => el.name.text === DEPRECATED_NAME &&
88
+ (el.propertyName ?? el.name).text === DEPRECATED_NAME);
89
+ rewriteNamedBindings(sourceFile, namedBindings, changes);
90
+ return localBindingRenamed;
91
+ }
92
+ function collectExportRewrite(sourceFile, stmt, specifiers, changes) {
93
+ if (!stmt.moduleSpecifier ||
94
+ !isTargetSpecifier(stmt.moduleSpecifier, specifiers)) {
95
+ return;
96
+ }
97
+ // `export { ... } from '...'` can be rewritten; `export * from '...'` has no
98
+ // named bindings to rename.
99
+ if (!stmt.exportClause || !ts.isNamedExports(stmt.exportClause)) {
100
+ return;
101
+ }
102
+ rewriteNamedBindings(sourceFile, stmt.exportClause, changes);
103
+ }
104
+ /**
105
+ * Re-renders the `{ ... }` of a named import/export, renaming any
106
+ * `createNodesV2` specifier to `createNodes`. If renaming would collide with a
107
+ * `createNodes` that is already present (e.g. `{ createNodes, createNodesV2 }`),
108
+ * the duplicate is dropped. Returns without recording a change when the binding
109
+ * list contains no `createNodesV2`.
110
+ */
111
+ function rewriteNamedBindings(sourceFile, namedBindings, changes) {
112
+ const elements = namedBindings.elements;
113
+ const hasDeprecated = elements.some((el) => (el.propertyName ?? el.name).text === DEPRECATED_NAME);
114
+ if (!hasDeprecated) {
115
+ return;
116
+ }
117
+ const seen = new Set();
118
+ const rendered = [];
119
+ for (const el of elements) {
120
+ const text = renderSpecifier(el);
121
+ if (!seen.has(text)) {
122
+ seen.add(text);
123
+ rendered.push(text);
124
+ }
125
+ }
126
+ const start = namedBindings.getStart(sourceFile);
127
+ changes.push({
128
+ type: devkit_1.ChangeType.Delete,
129
+ start,
130
+ length: namedBindings.getEnd() - start,
131
+ }, {
132
+ type: devkit_1.ChangeType.Insert,
133
+ index: start,
134
+ text: `{ ${rendered.join(', ')} }`,
135
+ });
136
+ }
137
+ function renderSpecifier(el) {
138
+ const typePrefix = el.isTypeOnly ? 'type ' : '';
139
+ const rename = (name) => name === DEPRECATED_NAME ? CANONICAL_NAME : name;
140
+ // `{ name }` — no alias, so the local binding follows the rename.
141
+ if (!el.propertyName) {
142
+ return `${typePrefix}${rename(el.name.text)}`;
143
+ }
144
+ // `{ propertyName as name }` — only the imported (left) side is renamed; the
145
+ // local alias is preserved. A now-redundant alias such as
146
+ // `createNodesV2 as createNodes` collapses to `createNodes`.
147
+ const canonicalImported = rename(el.propertyName.text);
148
+ const localName = el.name.text;
149
+ return canonicalImported === localName
150
+ ? `${typePrefix}${localName}`
151
+ : `${typePrefix}${canonicalImported} as ${localName}`;
152
+ }
153
+ /**
154
+ * Renames value references of `createNodesV2` to `createNodes` in the file
155
+ * body. Only called once a local `createNodesV2` import binding has actually
156
+ * been renamed, so these references would otherwise dangle. Occurrences that
157
+ * are not references to that binding are skipped: the import/export
158
+ * declarations themselves, property accesses (`x.createNodesV2`), qualified
159
+ * type names, object-literal keys, and declaration names that shadow the
160
+ * import. A shorthand property (`{ createNodesV2 }`) is expanded to
161
+ * `{ createNodesV2: createNodes }` so the property key is preserved. Strings
162
+ * and comments are never `Identifier` nodes, so they are left alone.
163
+ */
164
+ function collectValueUsageRewrites(sourceFile, changes) {
165
+ const visit = (node) => {
166
+ if (ts.isIdentifier(node) &&
167
+ node.text === DEPRECATED_NAME &&
168
+ isRenamableValueUsage(node)) {
169
+ const start = node.getStart(sourceFile);
170
+ changes.push({
171
+ type: devkit_1.ChangeType.Delete,
172
+ start,
173
+ length: node.getEnd() - start,
174
+ }, {
175
+ type: devkit_1.ChangeType.Insert,
176
+ index: start,
177
+ text: ts.isShorthandPropertyAssignment(node.parent)
178
+ ? `${DEPRECATED_NAME}: ${CANONICAL_NAME}`
179
+ : CANONICAL_NAME,
180
+ });
181
+ }
182
+ node.forEachChild(visit);
183
+ };
184
+ sourceFile.forEachChild(visit);
185
+ }
186
+ /**
187
+ * Whether a `createNodesV2` identifier is a value reference to the renamed
188
+ * import binding, as opposed to a position that must be left untouched.
189
+ */
190
+ function isRenamableValueUsage(node) {
191
+ const parent = node.parent;
192
+ if (!parent) {
193
+ return false;
194
+ }
195
+ // Import/export bindings — already handled by the declaration rewrite.
196
+ if (ts.isImportSpecifier(parent) ||
197
+ ts.isExportSpecifier(parent) ||
198
+ ts.isImportClause(parent) ||
199
+ ts.isNamespaceImport(parent)) {
200
+ return false;
201
+ }
202
+ // `x.createNodesV2` / `X.createNodesV2` — a member name, not the binding.
203
+ if (ts.isPropertyAccessExpression(parent) && parent.name === node) {
204
+ return false;
205
+ }
206
+ if (ts.isQualifiedName(parent) && parent.right === node) {
207
+ return false;
208
+ }
209
+ // `{ createNodesV2: ... }` — an object-literal key, not the binding.
210
+ if (ts.isPropertyAssignment(parent) && parent.name === node) {
211
+ return false;
212
+ }
213
+ // A declaration whose name shadows the import (variable, param, etc.).
214
+ if ((ts.isVariableDeclaration(parent) ||
215
+ ts.isParameter(parent) ||
216
+ ts.isBindingElement(parent) ||
217
+ ts.isFunctionDeclaration(parent) ||
218
+ ts.isClassDeclaration(parent)) &&
219
+ parent.name === node) {
220
+ return false;
221
+ }
222
+ return true;
223
+ }
@@ -1,4 +1,4 @@
1
- import { type CreateNodesV2 } from '@nx/devkit';
1
+ import { type CreateNodes } from '@nx/devkit';
2
2
  export interface DockerTargetOptions {
3
3
  name: string;
4
4
  args?: string[];
@@ -22,6 +22,9 @@ export interface DockerPluginOptions {
22
22
  buildTarget?: string | DockerTargetOptions;
23
23
  runTarget?: string | DockerTargetOptions;
24
24
  }
25
- export declare const createNodesV2: CreateNodesV2<DockerPluginOptions>;
25
+ export declare const createNodes: CreateNodes<DockerPluginOptions>;
26
+ /**
27
+ * @deprecated Use {@link createNodes} instead. This will be removed in Nx 24.
28
+ */
29
+ export declare const createNodesV2: CreateNodes<DockerPluginOptions>;
26
30
  export declare function getProjectNameFromPath(projectRoot: string, workspaceRoot: string): string;
27
- //# sourceMappingURL=plugin.d.ts.map
@@ -1,45 +1,44 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createNodesV2 = void 0;
3
+ exports.createNodesV2 = exports.createNodes = void 0;
4
4
  exports.getProjectNameFromPath = getProjectNameFromPath;
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
7
7
  const file_hasher_1 = require("nx/src/hasher/file-hasher");
8
8
  const cache_directory_1 = require("nx/src/utils/cache-directory");
9
9
  const fs_1 = require("fs");
10
10
  const path_1 = require("path");
11
- const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
12
11
  const git_utils_1 = require("nx/src/utils/git-utils");
13
12
  const interpolate_pattern_1 = require("../utils/interpolate-pattern");
14
- function readTargetsCache(cachePath) {
15
- return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
16
- }
17
- function writeTargetsCache(cachePath, results) {
18
- (0, devkit_1.writeJsonFile)(cachePath, results ?? {});
19
- }
20
13
  const dockerfileGlob = '**/Dockerfile';
21
- exports.createNodesV2 = [
14
+ exports.createNodes = [
22
15
  dockerfileGlob,
23
16
  async (configFilePaths, options, context) => {
24
17
  const optionsHash = (0, file_hasher_1.hashObject)(options);
25
18
  const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `docker-${optionsHash}.hash`);
26
- const targetsCache = readTargetsCache(cachePath);
19
+ const targetsCache = new internal_1.PluginCache(cachePath);
27
20
  const projectRoots = configFilePaths.map((c) => (0, path_1.dirname)(c));
28
21
  const normalizedOptions = normalizePluginOptions(options);
29
22
  // TODO(colum): investigate hashing only the dockerfile
30
- const hashes = await (0, calculate_hash_for_create_nodes_1.calculateHashesForCreateNodes)(projectRoots, normalizedOptions, context);
23
+ const hashes = await (0, internal_1.calculateHashesForCreateNodes)(projectRoots, normalizedOptions, context);
31
24
  try {
32
25
  return await (0, devkit_1.createNodesFromFiles)((configFile, _, context, idx) => createNodesInternal(configFile, hashes[idx] + configFile, normalizedOptions, context, targetsCache), configFilePaths, options, context);
33
26
  }
34
27
  finally {
35
- writeTargetsCache(cachePath, targetsCache);
28
+ targetsCache.writeToDisk();
36
29
  }
37
30
  },
38
31
  ];
32
+ /**
33
+ * @deprecated Use {@link createNodes} instead. This will be removed in Nx 24.
34
+ */
35
+ exports.createNodesV2 = exports.createNodes;
39
36
  async function createNodesInternal(configFilePath, hash, normalizedOptions, context, targetsCache) {
40
37
  const projectRoot = (0, path_1.dirname)(configFilePath);
41
- targetsCache[hash] ??= await createDockerTargets(projectRoot, normalizedOptions, context);
42
- const { targets, metadata } = targetsCache[hash];
38
+ if (!targetsCache.has(hash)) {
39
+ targetsCache.set(hash, await createDockerTargets(projectRoot, normalizedOptions, context));
40
+ }
41
+ const { targets, metadata } = targetsCache.get(hash);
43
42
  return {
44
43
  projects: {
45
44
  [projectRoot]: {
@@ -135,7 +134,7 @@ async function createDockerTargets(projectRoot, options, context) {
135
134
  const imageRef = getProjectNameFromPath(projectRoot, devkit_1.workspaceRoot);
136
135
  const interpolatedBuildTarget = interpolateDockerTargetOptions(options.buildTarget, projectRoot, imageRef, context);
137
136
  const interpolatedRunTarget = interpolateDockerTargetOptions(options.runTarget, projectRoot, imageRef, context);
138
- const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
137
+ const namedInputs = (0, internal_1.getNamedInputs)(projectRoot, context);
139
138
  const targets = {};
140
139
  const metadata = {
141
140
  targetGroups: {
@@ -199,6 +198,7 @@ async function createDockerTargets(projectRoot, options, context) {
199
198
  };
200
199
  targets['nx-release-publish'] = {
201
200
  executor: '@nx/docker:release-publish',
201
+ continuous: false,
202
202
  };
203
203
  return { targets, metadata };
204
204
  }
@@ -16,4 +16,3 @@ export interface PatternTokens {
16
16
  versionActionsVersion: string;
17
17
  }
18
18
  export declare function interpolateVersionPattern(versionPattern: string, data: Partial<PatternTokens>): string;
19
- //# sourceMappingURL=version-pattern-utils.d.ts.map
@@ -5,4 +5,3 @@ export declare function handleDockerVersion(workspaceRoot: string, projectGraphN
5
5
  newVersion: string;
6
6
  logs: string[];
7
7
  }>;
8
- //# sourceMappingURL=version-utils.d.ts.map
@@ -51,8 +51,17 @@ async function promptForNewVersion(versionSchemes, projectName) {
51
51
  name: vs,
52
52
  message: vs,
53
53
  value: vs,
54
- hint: (0, version_pattern_utils_1.interpolateVersionPattern)(versionSchemes[vs], { projectName }),
54
+ description: (0, version_pattern_utils_1.interpolateVersionPattern)(versionSchemes[vs], {
55
+ projectName,
56
+ }),
55
57
  })),
58
+ // Show only the focused scheme's resolved pattern, not every row's at once.
59
+ footer: function () {
60
+ const focused = this.focused;
61
+ return focused?.description
62
+ ? this.styles.muted(` ${focused.description}`)
63
+ : '';
64
+ },
56
65
  });
57
66
  return versionScheme;
58
67
  }
@@ -20,4 +20,3 @@ export declare function interpolatePattern(pattern: string, tokens: Record<strin
20
20
  * @returns New object/array with interpolated values
21
21
  */
22
22
  export declare function interpolateObject<T>(obj: T, tokens: Record<string, any>): T;
23
- //# sourceMappingURL=interpolate-pattern.d.ts.map
@@ -0,0 +1 @@
1
+ export declare const nxVersion: any;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.nxVersion = void 0;
4
+ const path_1 = require("path");
5
+ exports.nxVersion = require((0, path_1.join)('@nx/docker', 'package.json')).version;
package/executors.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "executors": {
4
4
  "release-publish": {
5
- "implementation": "./src/executors/release-publish/release-publish.impl",
6
- "schema": "./src/executors/release-publish/schema.json",
5
+ "implementation": "./dist/src/executors/release-publish/release-publish.impl",
6
+ "schema": "./dist/src/executors/release-publish/schema.json",
7
7
  "description": "DO NOT INVOKE DIRECTLY WITH `nx run`. Use `nx release publish` instead.",
8
8
  "hidden": true
9
9
  }
package/generators.json CHANGED
@@ -3,8 +3,8 @@
3
3
  "version": "0.1",
4
4
  "generators": {
5
5
  "init": {
6
- "factory": "./src/generators/init/init",
7
- "schema": "./src/generators/init/schema.json",
6
+ "factory": "./dist/src/generators/init/init",
7
+ "schema": "./dist/src/generators/init/schema.json",
8
8
  "description": "Initialize the `@nx/docker` plugin. **Experimental**: Docker support is experimental. Breaking changes may occur and not adhere to semver versioning.",
9
9
  "aliases": ["ng-add"],
10
10
  "hidden": true
package/migrations.json CHANGED
@@ -1 +1,10 @@
1
- {}
1
+ {
2
+ "generators": {
3
+ "update-23-0-0-migrate-create-nodes-v2-import": {
4
+ "version": "23.0.0-beta.24",
5
+ "description": "Rename imports of `createNodesV2` from `@nx/docker` to the canonical `createNodes` export.",
6
+ "implementation": "./dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes",
7
+ "documentation": "./dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md"
8
+ }
9
+ }
10
+ }
package/package.json CHANGED
@@ -1,8 +1,15 @@
1
1
  {
2
2
  "name": "@nx/docker",
3
3
  "description": "The Nx Plugin for Docker to aid in containerizing projects.",
4
- "version": "23.0.0-pr.35465.2bc2643",
4
+ "version": "23.0.0-rc.1",
5
5
  "type": "commonjs",
6
+ "files": [
7
+ "dist",
8
+ "!dist/tsconfig.tsbuildinfo",
9
+ "migrations.json",
10
+ "executors.json",
11
+ "generators.json"
12
+ ],
6
13
  "publishConfig": {
7
14
  "access": "public"
8
15
  },
@@ -22,40 +29,67 @@
22
29
  "author": "Victor Savkin",
23
30
  "license": "MIT",
24
31
  "homepage": "https://nx.dev",
25
- "main": "index.js",
32
+ "main": "./dist/index.js",
33
+ "types": "./dist/index.d.ts",
34
+ "typesVersions": {
35
+ "*": {
36
+ "generators": [
37
+ "dist/generators.d.ts"
38
+ ],
39
+ "release/version-utils": [
40
+ "dist/src/release/version-utils.d.ts"
41
+ ],
42
+ "src/*": [
43
+ "dist/src/*.d.ts"
44
+ ],
45
+ "src/*.js": [
46
+ "dist/src/*.d.ts"
47
+ ]
48
+ }
49
+ },
26
50
  "exports": {
27
51
  ".": {
28
- "types": "./index.d.ts",
29
- "default": "./index.js"
30
- },
31
- "./release/version-utils": {
32
- "types": "./src/release/version-utils.d.ts",
33
- "default": "./src/release/version-utils.js"
52
+ "@nx/nx-source": "./index.ts",
53
+ "types": "./dist/index.d.ts",
54
+ "default": "./dist/index.js"
34
55
  },
35
56
  "./generators": {
36
- "types": "./generators.d.ts",
37
- "default": "./generators.js"
57
+ "@nx/nx-source": "./generators.ts",
58
+ "types": "./dist/generators.d.ts",
59
+ "default": "./dist/generators.js"
60
+ },
61
+ "./release/version-utils": {
62
+ "@nx/nx-source": "./src/release/version-utils.ts",
63
+ "types": "./dist/src/release/version-utils.d.ts",
64
+ "default": "./dist/src/release/version-utils.js"
38
65
  },
39
- "./executors/*/schema.json": "./src/executors/*/schema.json",
40
- "./executors/*/schema": "./src/executors/*/schema.d.ts",
41
- "./generators/*/schema.json": "./src/generators/*/schema.json",
42
- "./generators/*/schema": "./src/generators/*/schema.d.ts",
43
66
  "./package.json": "./package.json",
44
67
  "./generators.json": "./generators.json",
45
68
  "./executors.json": "./executors.json",
46
- "./migrations.json": "./migrations.json"
69
+ "./migrations.json": "./migrations.json",
70
+ "./src/*": {
71
+ "@nx/nx-source": "./src/*.ts",
72
+ "types": "./dist/src/*.d.ts",
73
+ "default": "./dist/src/*.js"
74
+ },
75
+ "./src/*.js": {
76
+ "@nx/nx-source": "./src/*.ts",
77
+ "types": "./dist/src/*.d.ts",
78
+ "default": "./dist/src/*.js"
79
+ }
47
80
  },
48
81
  "nx-migrations": {
49
- "migrations": "./migrations.json"
82
+ "migrations": "./migrations.json",
83
+ "supportsOptionalMigrations": true
50
84
  },
51
85
  "executors": "./executors.json",
52
86
  "generators": "./generators.json",
53
87
  "dependencies": {
54
- "@nx/devkit": "23.0.0-pr.35465.2bc2643",
55
88
  "enquirer": "~2.3.6",
56
- "tslib": "^2.3.0"
89
+ "tslib": "^2.3.0",
90
+ "@nx/devkit": "23.0.0-rc.1"
57
91
  },
58
92
  "devDependencies": {
59
- "nx": "23.0.0-pr.35465.2bc2643"
93
+ "nx": "23.0.0-rc.1"
60
94
  }
61
95
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../../packages/docker/generators.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
package/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { createNodesV2, DockerPluginOptions } from './src/plugins/plugin';
2
- //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/docker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"release-publish.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/docker/src/executors/release-publish/release-publish.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAI3D,MAAM,WAAW,oCAAoC;IACnD,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,QAAiB,CAAC;AAE3C,wBAA8B,oBAAoB,CAChD,MAAM,EAAE,0BAA0B,EAClC,OAAO,EAAE,eAAe;;GAmBzB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/docker/src/generators/init/init.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,iBAAiB,EAQvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,mBAAmB,qBAUzE;AAwCD,wBAAsB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,mBAAmB,8BAiB1E;AAED,eAAe,aAAa,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/docker/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAQnB,MAAM,YAAY,CAAC;AAUpB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CACrB,MAAM,EACN,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,GAAG,MAAM,CAAC,CACrD,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC;CAC1C;AAsBD,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAmC5D,CAAC;AAmDF,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,MAAM,CAOR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"version-pattern-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/docker/src/release/version-pattern-utils.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,IAAI,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,yBAAyB,CACvC,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,UAY7B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"version-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/docker/src/release/version-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAiB,MAAM,YAAY,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAQ7F,eAAO,MAAM,oBAAoB,GAC/B,eAAe,MAAM,EACrB,aAAa,MAAM,WAGpB,CAAC;AAEF,wBAAsB,mBAAmB,CACvC,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,uBAAuB,EACzC,qBAAqB,EAAE,qBAAqB,EAC5C,mBAAmB,CAAC,EAAE,MAAM,EAC5B,aAAa,CAAC,EAAE,MAAM,EACtB,qBAAqB,CAAC,EAAE,MAAM;;;GA+C/B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"interpolate-pattern.d.ts","sourceRoot":"","sources":["../../../../../packages/docker/src/utils/interpolate-pattern.ts"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC1B,MAAM,CA6BR;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAkB3E"}
@@ -1,2 +0,0 @@
1
- export declare const nxVersion: any;
2
- //# sourceMappingURL=versions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/docker/src/utils/versions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,KAAwC,CAAC"}
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nxVersion = void 0;
4
- exports.nxVersion = require('../../package.json').version;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes