@angular-devkit/architect 0.1901.0-next.1 → 0.1901.0-rc.0

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2010-2024 Google LLC. https://angular.dev/license
3
+ Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -5,5 +5,5 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
- declare const _default: import("../src/internal").Builder<import("../../core/src").JsonObject>;
8
+ declare const _default: import("../src/internal").Builder<import("../../core").JsonObject>;
9
9
  export default _default;
@@ -5,5 +5,5 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
- declare const _default: import("../src/internal").Builder<import("../../core/src").JsonObject>;
8
+ declare const _default: import("../src/internal").Builder<import("../../core").JsonObject>;
9
9
  export default _default;
package/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ export * from './src/index';
package/index.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.dev/license
8
+ */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ __exportStar(require("./src/index"), exports);
@@ -67,6 +67,9 @@ function findProjectTarget(workspace, project, target) {
67
67
  if (!targetDefinition) {
68
68
  throw new Error('Project target does not exist.');
69
69
  }
70
+ if (!targetDefinition.builder) {
71
+ throw new Error(`A builder is not set for target '${target}' in project '${project}'.`);
72
+ }
70
73
  return targetDefinition;
71
74
  }
72
75
  class WorkspaceNodeModulesArchitectHost {
@@ -80,8 +83,8 @@ class WorkspaceNodeModulesArchitectHost {
80
83
  else {
81
84
  this.workspaceHost = {
82
85
  async getBuilderName(project, target) {
83
- const targetDefinition = findProjectTarget(workspaceOrHost, project, target);
84
- return targetDefinition.builder;
86
+ const { builder } = findProjectTarget(workspaceOrHost, project, target);
87
+ return builder;
85
88
  },
86
89
  async getOptions(project, target, configuration) {
87
90
  const targetDefinition = findProjectTarget(workspaceOrHost, project, target);
@@ -167,27 +170,20 @@ class WorkspaceNodeModulesArchitectHost {
167
170
  throw new Error(`Package "${packageName}" has an invalid builder implementation path: "${builderName}" --> "${builder.implementation}"`);
168
171
  }
169
172
  // Determine builder option schema path (relative within package only)
170
- let schemaPath = builder.schema && path.normalize(builder.schema);
173
+ let schemaPath = builder.schema;
171
174
  if (!schemaPath) {
172
175
  throw new Error('Could not find the schema for builder ' + builderStr);
173
176
  }
174
- if (path.isAbsolute(schemaPath) || schemaPath.startsWith('..')) {
175
- throw new Error(`Package "${packageName}" has an invalid builder implementation path: "${builderName}" --> "${builder.schema}"`);
177
+ if (path.isAbsolute(schemaPath) || path.normalize(schemaPath).startsWith('..')) {
178
+ throw new Error(`Package "${packageName}" has an invalid builder schema path: "${builderName}" --> "${builder.schema}"`);
176
179
  }
177
180
  // The file could be either a package reference or in the local manifest directory.
178
- // Node resolution is tried first then reading the file from the manifest directory if resolution fails.
179
- try {
180
- schemaPath = localRequire.resolve(schemaPath, {
181
- paths: [buildersManifestDirectory],
182
- });
181
+ if (schemaPath.startsWith('.')) {
182
+ schemaPath = path.join(buildersManifestDirectory, schemaPath);
183
183
  }
184
- catch (e) {
185
- if (e.code === 'MODULE_NOT_FOUND') {
186
- schemaPath = path.join(buildersManifestDirectory, schemaPath);
187
- }
188
- else {
189
- throw e;
190
- }
184
+ else {
185
+ const manifestRequire = (0, node_module_1.createRequire)(buildersManifestDirectory + '/');
186
+ schemaPath = manifestRequire.resolve(schemaPath);
191
187
  }
192
188
  const schemaText = (0, node_fs_1.readFileSync)(schemaPath, 'utf-8');
193
189
  return Promise.resolve({
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@angular-devkit/architect",
3
- "version": "0.1901.0-next.1",
3
+ "version": "0.1901.0-rc.0",
4
4
  "description": "Angular Build Facade",
5
5
  "experimental": true,
6
6
  "main": "src/index.js",
7
7
  "typings": "src/index.d.ts",
8
8
  "dependencies": {
9
- "@angular-devkit/core": "19.1.0-next.1",
9
+ "@angular-devkit/core": "19.1.0-rc.0",
10
10
  "rxjs": "7.8.1"
11
11
  },
12
12
  "builders": "./builders/builders.json",
@@ -17,7 +17,6 @@
17
17
  "devkit",
18
18
  "sdk"
19
19
  ],
20
- "packageManager": "yarn@4.5.0",
21
20
  "repository": {
22
21
  "type": "git",
23
22
  "url": "https://github.com/angular/angular-cli.git"
@@ -40,5 +39,8 @@
40
39
  "puppeteer": {
41
40
  "built": true
42
41
  }
42
+ },
43
+ "pnpm": {
44
+ "onlyBuiltDependencies": []
43
45
  }
44
46
  }