@arcgis/components-build-utils 5.0.0-next.138 → 5.0.0-next.139
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/commands/generate-builddate.d.cts +2 -1
- package/dist/commands/generate-builddate.d.ts +2 -1
- package/dist/commands/run.d.cts +0 -1
- package/dist/commands/run.d.ts +0 -1
- package/dist/commands/scan-dist.d.cts +1 -1
- package/dist/commands/scan-dist.d.ts +1 -1
- package/dist/commands/utils/{npm.d.cts → npm-utils.d.cts} +0 -2
- package/dist/commands/utils/{npm.d.ts → npm-utils.d.ts} +0 -2
- package/dist/commands/utils/{commands.d.cts → utils.d.cts} +9 -0
- package/dist/commands/utils/{commands.d.ts → utils.d.ts} +9 -0
- package/dist/file.d.cts +2 -2
- package/dist/file.d.ts +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/packageJson.d.cts +2 -1
- package/dist/packageJson.d.ts +2 -1
- package/package.json +3 -4
- package/src/commands/run-wrapper.js +6 -0
- package/dist/commands/deployable-projects.d.cts +0 -2
- package/dist/commands/deployable-projects.d.ts +0 -2
- package/dist/commands/workspaces-list.d.cts +0 -2
- package/dist/commands/workspaces-list.d.ts +0 -2
- package/src/commands/run.ts +0 -46
- /package/dist/commands/utils/{github-actions.d.cts → github-actions-utils.d.cts} +0 -0
- /package/dist/commands/utils/{github-actions.d.ts → github-actions-utils.d.ts} +0 -0
|
@@ -7,5 +7,6 @@ export type Builddate = {
|
|
|
7
7
|
"version": string;
|
|
8
8
|
"@arcgis/core": string;
|
|
9
9
|
"@esri/calcite-components": string;
|
|
10
|
+
"@esri/arcgis-html-sanitizer": string;
|
|
10
11
|
};
|
|
11
|
-
export declare function generateBuilddate(): Builddate
|
|
12
|
+
export declare function generateBuilddate(): Promise<Builddate>;
|
|
@@ -7,5 +7,6 @@ export type Builddate = {
|
|
|
7
7
|
"version": string;
|
|
8
8
|
"@arcgis/core": string;
|
|
9
9
|
"@esri/calcite-components": string;
|
|
10
|
+
"@esri/arcgis-html-sanitizer": string;
|
|
10
11
|
};
|
|
11
|
-
export declare function generateBuilddate(): Builddate
|
|
12
|
+
export declare function generateBuilddate(): Promise<Builddate>;
|
package/dist/commands/run.d.cts
CHANGED
package/dist/commands/run.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from '@commander-js/extra-typings';
|
|
2
|
-
import { PackageWalkerItem } from './utils/
|
|
2
|
+
import { PackageWalkerItem } from './utils/utils.ts';
|
|
3
3
|
export declare const registerCommand: (command: Command) => undefined;
|
|
4
4
|
export declare function scanDist({ blocklistedNames }: {
|
|
5
5
|
blocklistedNames?: string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command } from '@commander-js/extra-typings';
|
|
2
|
-
import { PackageWalkerItem } from './utils/
|
|
2
|
+
import { PackageWalkerItem } from './utils/utils.ts';
|
|
3
3
|
export declare const registerCommand: (command: Command) => undefined;
|
|
4
4
|
export declare function scanDist({ blocklistedNames }: {
|
|
5
5
|
blocklistedNames?: string[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { MiniPackageJson } from '../../packageJson.ts';
|
|
2
1
|
/**
|
|
3
2
|
* Fetch all published versions for a package.
|
|
4
3
|
*/
|
|
@@ -33,4 +32,3 @@ export declare function undeprecate(pkgSpec: string, options: {
|
|
|
33
32
|
stdout?: string;
|
|
34
33
|
error?: unknown;
|
|
35
34
|
}>;
|
|
36
|
-
export declare function isPackageAlreadyPublished(packageJson: MiniPackageJson): boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { MiniPackageJson } from '../../packageJson.ts';
|
|
2
1
|
/**
|
|
3
2
|
* Fetch all published versions for a package.
|
|
4
3
|
*/
|
|
@@ -33,4 +32,3 @@ export declare function undeprecate(pkgSpec: string, options: {
|
|
|
33
32
|
stdout?: string;
|
|
34
33
|
error?: unknown;
|
|
35
34
|
}>;
|
|
36
|
-
export declare function isPackageAlreadyPublished(packageJson: MiniPackageJson): boolean;
|
|
@@ -11,6 +11,12 @@ export declare function error(...messages: unknown[]): void;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function errorAndExit(...messages: unknown[]): never;
|
|
13
13
|
export declare function findRepositoryRoot(): string;
|
|
14
|
+
export declare function isURL(source: string): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Returns a list of all package paths in the workspace,
|
|
17
|
+
* as resolved from workspaces in root package.json
|
|
18
|
+
*/
|
|
19
|
+
export declare function getWorkspacesPackagePaths(includeRootPackage?: boolean): Promise<string[]>;
|
|
14
20
|
export type PackageWalkerItem = PackageWalkerResult<MiniPackageJson>;
|
|
15
21
|
type PackageWalkerResult<T> = {
|
|
16
22
|
/**
|
|
@@ -57,5 +63,8 @@ export declare function getAffectedPackages(changed: Iterable<string>, options?:
|
|
|
57
63
|
*/
|
|
58
64
|
export declare function isSigint(err: unknown): boolean;
|
|
59
65
|
export declare function getBranchName(): string;
|
|
66
|
+
export declare function getStagedFiles(options?: Partial<ExecSyncOptionsWithStringEncoding>): string[];
|
|
67
|
+
export declare function getModifiedFiles(options?: Partial<ExecSyncOptionsWithStringEncoding>): string[];
|
|
68
|
+
export declare function commitStagedFiles(messages: string, options?: Partial<ExecSyncOptionsWithStringEncoding>): void;
|
|
60
69
|
export declare function pushCommits(options?: Partial<ExecSyncOptionsWithStringEncoding>): void;
|
|
61
70
|
export {};
|
|
@@ -11,6 +11,12 @@ export declare function error(...messages: unknown[]): void;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function errorAndExit(...messages: unknown[]): never;
|
|
13
13
|
export declare function findRepositoryRoot(): string;
|
|
14
|
+
export declare function isURL(source: string): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Returns a list of all package paths in the workspace,
|
|
17
|
+
* as resolved from workspaces in root package.json
|
|
18
|
+
*/
|
|
19
|
+
export declare function getWorkspacesPackagePaths(includeRootPackage?: boolean): Promise<string[]>;
|
|
14
20
|
export type PackageWalkerItem = PackageWalkerResult<MiniPackageJson>;
|
|
15
21
|
type PackageWalkerResult<T> = {
|
|
16
22
|
/**
|
|
@@ -57,5 +63,8 @@ export declare function getAffectedPackages(changed: Iterable<string>, options?:
|
|
|
57
63
|
*/
|
|
58
64
|
export declare function isSigint(err: unknown): boolean;
|
|
59
65
|
export declare function getBranchName(): string;
|
|
66
|
+
export declare function getStagedFiles(options?: Partial<ExecSyncOptionsWithStringEncoding>): string[];
|
|
67
|
+
export declare function getModifiedFiles(options?: Partial<ExecSyncOptionsWithStringEncoding>): string[];
|
|
68
|
+
export declare function commitStagedFiles(messages: string, options?: Partial<ExecSyncOptionsWithStringEncoding>): void;
|
|
60
69
|
export declare function pushCommits(options?: Partial<ExecSyncOptionsWithStringEncoding>): void;
|
|
61
70
|
export {};
|
package/dist/file.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ExecSyncOptionsWithStringEncoding } from 'node:child_process';
|
|
2
2
|
export declare const existsAsync: (file: string) => Promise<boolean>;
|
|
3
3
|
/** Wrapper for execSync to execute shell commands */
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
4
|
+
export declare function shSync(command: string, options?: Partial<ExecSyncOptionsWithStringEncoding>): string;
|
|
5
|
+
export declare function sh(command: string, options?: Partial<ExecSyncOptionsWithStringEncoding>): Promise<string>;
|
|
6
6
|
export declare function createFileIfNotExists(filePath: string, content: string): Promise<void>;
|
|
7
7
|
/**
|
|
8
8
|
* Climb the directory tree upward, until found a directory that contains the
|
package/dist/file.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ExecSyncOptionsWithStringEncoding } from 'node:child_process';
|
|
2
2
|
export declare const existsAsync: (file: string) => Promise<boolean>;
|
|
3
3
|
/** Wrapper for execSync to execute shell commands */
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
4
|
+
export declare function shSync(command: string, options?: Partial<ExecSyncOptionsWithStringEncoding>): string;
|
|
5
|
+
export declare function sh(command: string, options?: Partial<ExecSyncOptionsWithStringEncoding>): Promise<string>;
|
|
6
6
|
export declare function createFileIfNotExists(filePath: string, content: string): Promise<void>;
|
|
7
7
|
/**
|
|
8
8
|
* Climb the directory tree upward, until found a directory that contains the
|
package/dist/index.cjs
CHANGED
|
@@ -34,7 +34,7 @@ const existsAsync = async (file) => (
|
|
|
34
34
|
// which interferes with debugging when "Pause on caught exceptions" is enabled
|
|
35
35
|
await new Promise((resolve2) => node_fs.access(file, promises.constants.F_OK, (error) => resolve2(!error)))
|
|
36
36
|
);
|
|
37
|
-
function
|
|
37
|
+
function shSync(command, options = {}) {
|
|
38
38
|
try {
|
|
39
39
|
const normalizedOptions = { encoding: "utf8", ...options };
|
|
40
40
|
return node_child_process.execSync(command.trim(), normalizedOptions).trim();
|
|
@@ -372,7 +372,7 @@ exports.isPosix = isPosix;
|
|
|
372
372
|
exports.normalizePath = normalizePath;
|
|
373
373
|
exports.path = path;
|
|
374
374
|
exports.retrievePackageJson = retrievePackageJson;
|
|
375
|
-
exports.sh =
|
|
375
|
+
exports.sh = shSync;
|
|
376
376
|
exports.toPosixPathSeparators = toPosixPathSeparators;
|
|
377
377
|
exports.toSystemPathSeparators = toSystemPathSeparators;
|
|
378
378
|
exports.vitePresetPlugin = vitePresetPlugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { existsAsync, sh, createFileIfNotExists, findPath, asyncFindPath } from './file.ts';
|
|
1
|
+
export { existsAsync, shSync as sh, createFileIfNotExists, findPath, asyncFindPath } from './file.ts';
|
|
2
2
|
export { gitIgnoreFileToGlobs, gitIgnoreToGlob } from './glob.ts';
|
|
3
3
|
export { isPosix, toPosixPathSeparators, normalizePath, toSystemPathSeparators, getCwd, path } from './path.ts';
|
|
4
4
|
export { type MiniPackageJson, retrievePackageJson, asyncRetrievePackageJson, fetchPackageLocation, detectPackageManager, } from './packageJson.ts';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { existsAsync, sh, createFileIfNotExists, findPath, asyncFindPath } from './file.ts';
|
|
1
|
+
export { existsAsync, shSync as sh, createFileIfNotExists, findPath, asyncFindPath } from './file.ts';
|
|
2
2
|
export { gitIgnoreFileToGlobs, gitIgnoreToGlob } from './glob.ts';
|
|
3
3
|
export { isPosix, toPosixPathSeparators, normalizePath, toSystemPathSeparators, getCwd, path } from './path.ts';
|
|
4
4
|
export { type MiniPackageJson, retrievePackageJson, asyncRetrievePackageJson, fetchPackageLocation, detectPackageManager, } from './packageJson.ts';
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const existsAsync = async (file) => (
|
|
|
10
10
|
// which interferes with debugging when "Pause on caught exceptions" is enabled
|
|
11
11
|
await new Promise((resolve2) => access(file, constants.F_OK, (error) => resolve2(!error)))
|
|
12
12
|
);
|
|
13
|
-
function
|
|
13
|
+
function shSync(command, options = {}) {
|
|
14
14
|
try {
|
|
15
15
|
const normalizedOptions = { encoding: "utf8", ...options };
|
|
16
16
|
return execSync(command.trim(), normalizedOptions).trim();
|
|
@@ -349,7 +349,7 @@ export {
|
|
|
349
349
|
normalizePath,
|
|
350
350
|
path,
|
|
351
351
|
retrievePackageJson,
|
|
352
|
-
sh,
|
|
352
|
+
shSync as sh,
|
|
353
353
|
toPosixPathSeparators,
|
|
354
354
|
toSystemPathSeparators,
|
|
355
355
|
vitePresetPlugin
|
package/dist/packageJson.d.cts
CHANGED
|
@@ -9,6 +9,7 @@ export type MiniPackageJson = {
|
|
|
9
9
|
"version": string;
|
|
10
10
|
"private"?: boolean;
|
|
11
11
|
"type"?: "commonjs" | "module";
|
|
12
|
+
"workspaces"?: string[];
|
|
12
13
|
"publishConfig"?: {
|
|
13
14
|
access?: string;
|
|
14
15
|
registry?: string;
|
|
@@ -41,6 +42,6 @@ export declare function asyncWritePackageJson(location: string, content: MiniPac
|
|
|
41
42
|
*/
|
|
42
43
|
export declare function fetchPackageLocation(packageName: string, cwd?: string): Promise<string>;
|
|
43
44
|
/**
|
|
44
|
-
* Detect if current repository/monorepo uses npm,
|
|
45
|
+
* Detect if current repository/monorepo uses npm, yarn or pnpm
|
|
45
46
|
*/
|
|
46
47
|
export declare function detectPackageManager(cwd?: string): string;
|
package/dist/packageJson.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export type MiniPackageJson = {
|
|
|
9
9
|
"version": string;
|
|
10
10
|
"private"?: boolean;
|
|
11
11
|
"type"?: "commonjs" | "module";
|
|
12
|
+
"workspaces"?: string[];
|
|
12
13
|
"publishConfig"?: {
|
|
13
14
|
access?: string;
|
|
14
15
|
registry?: string;
|
|
@@ -41,6 +42,6 @@ export declare function asyncWritePackageJson(location: string, content: MiniPac
|
|
|
41
42
|
*/
|
|
42
43
|
export declare function fetchPackageLocation(packageName: string, cwd?: string): Promise<string>;
|
|
43
44
|
/**
|
|
44
|
-
* Detect if current repository/monorepo uses npm,
|
|
45
|
+
* Detect if current repository/monorepo uses npm, yarn or pnpm
|
|
45
46
|
*/
|
|
46
47
|
export declare function detectPackageManager(cwd?: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/components-build-utils",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.139",
|
|
4
4
|
"description": "Collection of common internal build-time patterns and utilities for ArcGIS Maps SDK for JavaScript components.",
|
|
5
5
|
"homepage": "https://developers.arcgis.com/javascript/latest/",
|
|
6
6
|
"type": "module",
|
|
@@ -18,13 +18,12 @@
|
|
|
18
18
|
"dist/"
|
|
19
19
|
],
|
|
20
20
|
"bin": {
|
|
21
|
-
"awc": "src/commands/run.
|
|
21
|
+
"awc": "src/commands/run-wrapper.js"
|
|
22
22
|
},
|
|
23
23
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@actions/core": "^1.11.0",
|
|
26
26
|
"@commander-js/extra-typings": "^14.0.0",
|
|
27
|
-
"@pnpm/workspace.read-manifest": "^1000.2.7",
|
|
28
27
|
"chalk": "^5.4.1",
|
|
29
28
|
"commander": "^14.0.0",
|
|
30
29
|
"fast-glob": "^3.3.3",
|
|
@@ -32,7 +31,7 @@
|
|
|
32
31
|
"glob": "^11.0.3",
|
|
33
32
|
"ora": "^8.2.0",
|
|
34
33
|
"p-limit": "^7.1.1",
|
|
35
|
-
"semver": "^7.7.
|
|
34
|
+
"semver": "^7.7.2",
|
|
36
35
|
"split2": "^4.2.0",
|
|
37
36
|
"tslib": "^2.8.1",
|
|
38
37
|
"vite": "^7.2.2",
|
package/src/commands/run.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { Command } from "@commander-js/extra-typings";
|
|
3
|
-
import fs from "node:fs";
|
|
4
|
-
|
|
5
|
-
interface CommandModule {
|
|
6
|
-
registerCommand: (program: Command) => void;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const program = new Command();
|
|
10
|
-
|
|
11
|
-
program.name("components-build-utils").description("Util scripts for working with monorepo components");
|
|
12
|
-
|
|
13
|
-
const commandsDirectory = import.meta.dirname;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* If CLI is called with a specific command, only load that command.
|
|
17
|
-
* Otherwise, load all.
|
|
18
|
-
*/
|
|
19
|
-
const commandName = process.argv[2];
|
|
20
|
-
const commandsToLoad =
|
|
21
|
-
commandName !== undefined && commandName !== "help" && !commandName.startsWith("-")
|
|
22
|
-
? [`${commandName}.ts`]
|
|
23
|
-
: fs.readdirSync(commandsDirectory);
|
|
24
|
-
// Load all commands in the ./commands directory
|
|
25
|
-
Promise.all(
|
|
26
|
-
commandsToLoad.map(async (file) => {
|
|
27
|
-
if (!file.endsWith(".ts")) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
let command: CommandModule;
|
|
31
|
-
try {
|
|
32
|
-
command = (await import(`./${file}`)) as CommandModule;
|
|
33
|
-
} catch {
|
|
34
|
-
console.error(`error: unknown command: ${file.slice(0, -".ts".length)}`);
|
|
35
|
-
process.exit(1);
|
|
36
|
-
}
|
|
37
|
-
if (typeof command.registerCommand === "function") {
|
|
38
|
-
command.registerCommand(program);
|
|
39
|
-
}
|
|
40
|
-
}),
|
|
41
|
-
)
|
|
42
|
-
.then(() => program.parse())
|
|
43
|
-
.catch((error) => {
|
|
44
|
-
console.error(error);
|
|
45
|
-
process.exit(1);
|
|
46
|
-
});
|
|
File without changes
|
|
File without changes
|