@celljs/cli 4.0.0 → 4.2.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/README.md +5 -4
- package/agent/guide.md +3 -3
- package/lib/agent/agent-guide.d.ts.map +1 -1
- package/lib/agent/agent-guide.js +3 -2
- package/lib/agent/agent-guide.js.map +1 -1
- package/lib/build/single-compile.spec.js +15 -9
- package/lib/build/single-compile.spec.js.map +1 -1
- package/lib/check/project-checker.d.ts +15 -9
- package/lib/check/project-checker.d.ts.map +1 -1
- package/lib/check/project-checker.js +23 -34
- package/lib/check/project-checker.js.map +1 -1
- package/lib/check/project-checker.spec.js +16 -5
- package/lib/check/project-checker.spec.js.map +1 -1
- package/lib/cli/cell-cli.spec.js +9 -4
- package/lib/cli/cell-cli.spec.js.map +1 -1
- package/lib/cli/check-command.d.ts.map +1 -1
- package/lib/cli/check-command.js +2 -2
- package/lib/cli/check-command.js.map +1 -1
- package/lib/cli/dev-command.spec.js +8 -3
- package/lib/cli/dev-command.spec.js.map +1 -1
- package/lib/config/config-explainer.d.ts.map +1 -1
- package/lib/config/config-explainer.js +2 -2
- package/lib/config/config-explainer.js.map +1 -1
- package/lib/deploy/code-package.d.ts +3 -2
- package/lib/deploy/code-package.d.ts.map +1 -1
- package/lib/deploy/code-package.js +3 -3
- package/lib/deploy/code-package.js.map +1 -1
- package/lib/deploy/deploy-utils.spec.js +16 -1
- package/lib/deploy/deploy-utils.spec.js.map +1 -1
- package/lib/deploy/zip-writer.d.ts +6 -2
- package/lib/deploy/zip-writer.d.ts.map +1 -1
- package/lib/deploy/zip-writer.js +9 -3
- package/lib/deploy/zip-writer.js.map +1 -1
- package/lib/docs/docs-index.d.ts.map +1 -1
- package/lib/docs/docs-index.js +3 -2
- package/lib/docs/docs-index.js.map +1 -1
- package/lib/events/hook-runner.spec.js +9 -4
- package/lib/events/hook-runner.spec.js.map +1 -1
- package/lib/info/project-inspector.d.ts.map +1 -1
- package/lib/info/project-inspector.js +3 -2
- package/lib/info/project-inspector.js.map +1 -1
- package/lib/init/project-initializer.d.ts.map +1 -1
- package/lib/init/project-initializer.js +2 -1
- package/lib/init/project-initializer.js.map +1 -1
- package/lib/mcp/dev-mcp-endpoint.d.ts +7 -14
- package/lib/mcp/dev-mcp-endpoint.d.ts.map +1 -1
- package/lib/mcp/dev-mcp-endpoint.js +4 -13
- package/lib/mcp/dev-mcp-endpoint.js.map +1 -1
- package/lib/mcp/dev-mcp-endpoint.spec.js +7 -7
- package/lib/mcp/dev-mcp-endpoint.spec.js.map +1 -1
- package/lib/preset/cloudflare/cloudflare-deployer.d.ts.map +1 -1
- package/lib/preset/cloudflare/cloudflare-deployer.js +3 -2
- package/lib/preset/cloudflare/cloudflare-deployer.js.map +1 -1
- package/lib/preset/cloudflare/wrangler-config.d.ts.map +1 -1
- package/lib/preset/cloudflare/wrangler-config.js +2 -1
- package/lib/preset/cloudflare/wrangler-config.js.map +1 -1
- package/lib/preset/fc/fc-deployer.js +2 -2
- package/lib/preset/fc/fc-deployer.js.map +1 -1
- package/lib/preset/lambda/lambda-deployer.js +2 -2
- package/lib/preset/lambda/lambda-deployer.js.map +1 -1
- package/lib/preset/preset-output.d.ts.map +1 -1
- package/lib/preset/preset-output.js +9 -1
- package/lib/preset/preset-output.js.map +1 -1
- package/lib/preset/scf/scf-deployer.js +2 -2
- package/lib/preset/scf/scf-deployer.js.map +1 -1
- package/lib/preset/serverless-presets.spec.js +19 -3
- package/lib/preset/serverless-presets.spec.js.map +1 -1
- package/lib/test/fixture-project.d.ts.map +1 -1
- package/lib/test/fixture-project.js +2 -1
- package/lib/test/fixture-project.js.map +1 -1
- package/lib/utils/path-util.d.ts +5 -0
- package/lib/utils/path-util.d.ts.map +1 -0
- package/lib/utils/path-util.js +10 -0
- package/lib/utils/path-util.js.map +1 -0
- package/lib/utils/path-util.spec.d.ts +2 -0
- package/lib/utils/path-util.spec.d.ts.map +1 -0
- package/lib/utils/path-util.spec.js +11 -0
- package/lib/utils/path-util.spec.js.map +1 -0
- package/package.json +9 -9
- package/src/agent/agent-guide.ts +3 -2
- package/src/check/project-checker.ts +36 -40
- package/src/cli/check-command.ts +2 -2
- package/src/config/config-explainer.ts +2 -2
- package/src/deploy/code-package.ts +4 -4
- package/src/deploy/zip-writer.ts +9 -3
- package/src/docs/docs-index.ts +3 -2
- package/src/info/project-inspector.ts +3 -2
- package/src/init/project-initializer.ts +2 -1
- package/src/mcp/dev-mcp-endpoint.ts +10 -19
- package/src/preset/cloudflare/cloudflare-deployer.ts +3 -2
- package/src/preset/cloudflare/wrangler-config.ts +2 -1
- package/src/preset/fc/fc-deployer.ts +2 -2
- package/src/preset/lambda/lambda-deployer.ts +2 -2
- package/src/preset/preset-output.ts +9 -1
- package/src/preset/scf/scf-deployer.ts +2 -2
- package/src/test/fixture-project.ts +2 -1
- package/src/utils/path-util.ts +8 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CellError } from '@celljs/kit';
|
|
1
|
+
import { CellError, type OutputManifest } from '@celljs/kit';
|
|
2
2
|
import { ZipWriter } from './zip-writer.js';
|
|
3
3
|
|
|
4
4
|
/** The zip of a build output that function platforms take as code. */
|
|
@@ -8,10 +8,10 @@ export class CodePackage {
|
|
|
8
8
|
readonly files: number,
|
|
9
9
|
) {}
|
|
10
10
|
|
|
11
|
-
/** Every file of the output directory. */
|
|
12
|
-
static of(outDir: string): CodePackage {
|
|
11
|
+
/** Every file of the output directory; the start scripts its manifest lists stay executable. */
|
|
12
|
+
static of(outDir: string, { executables = [], executable }: OutputManifest): CodePackage {
|
|
13
13
|
const writer = new ZipWriter();
|
|
14
|
-
writer.addDirectory(outDir);
|
|
14
|
+
writer.addDirectory(outDir, '', executable ? [...executables, executable.file] : executables);
|
|
15
15
|
return new CodePackage(writer.toBuffer(), writer.files);
|
|
16
16
|
}
|
|
17
17
|
|
package/src/deploy/zip-writer.ts
CHANGED
|
@@ -26,13 +26,19 @@ export class ZipWriter {
|
|
|
26
26
|
protected readonly chunks: Buffer[] = [];
|
|
27
27
|
protected offset = 0;
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Adds every file under `dir`, sorted, at `prefix` (`a/b` style) in the archive. `executables`
|
|
31
|
+
* (paths relative to `dir`, `a/b` style) get 0755 whatever the file system says: Windows has no
|
|
32
|
+
* executable bit, and there every other file gets 0644.
|
|
33
|
+
*/
|
|
34
|
+
addDirectory(dir: string, prefix = '', executables: readonly string[] = []): this {
|
|
31
35
|
for (const name of (readdirSync(dir, { recursive: true }) as string[]).sort()) {
|
|
32
36
|
const file = join(dir, name);
|
|
33
37
|
const stat = statSync(file);
|
|
34
38
|
if (stat.isFile()) {
|
|
35
|
-
|
|
39
|
+
const entry = name.split(sep).join('/');
|
|
40
|
+
const mode = executables.includes(entry) ? 0o755 : process.platform === 'win32' ? 0o644 : stat.mode & 0o777;
|
|
41
|
+
this.add(`${prefix}${entry}`, readFileSync(file), mode);
|
|
36
42
|
}
|
|
37
43
|
}
|
|
38
44
|
return this;
|
package/src/docs/docs-index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
2
|
-
import { join
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { PathUtil } from '../utils/path-util.js';
|
|
3
4
|
|
|
4
5
|
/** Where documentation is read from: a directory of Markdown or one file, and who provides it. */
|
|
5
6
|
export interface DocsSource {
|
|
@@ -125,7 +126,7 @@ export class DocsIndex {
|
|
|
125
126
|
continue;
|
|
126
127
|
}
|
|
127
128
|
seen.add(file);
|
|
128
|
-
this.sections.push(...DocsIndex.split(readFileSync(file, 'utf8'), relative(this.root, file) || file, source));
|
|
129
|
+
this.sections.push(...DocsIndex.split(readFileSync(file, 'utf8'), PathUtil.relative(this.root, file) || file, source));
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
132
|
this.fileCount = seen.size;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
2
|
-
import { basename, isAbsolute, join
|
|
2
|
+
import { basename, isAbsolute, join } from 'node:path';
|
|
3
3
|
import type { CheckIssue, ComponentInfo, EnvOverrideReport, Preset, ProjectModel, ServerRuntime, Target, TargetModel } from '@celljs/kit';
|
|
4
4
|
import { type OutputManifest, ProjectLoader, type ProjectLoaderOptions } from '@celljs/vite';
|
|
5
5
|
import { ConfigResolver, type ModuleSpec, type ResolvedConfig, type ValueSource } from '../config/config-resolver.js';
|
|
6
6
|
import type { CompileTarget } from '../config/types.js';
|
|
7
7
|
import type { ModuleRegistrations } from '../modules/module-host.js';
|
|
8
|
+
import { PathUtil } from '../utils/path-util.js';
|
|
8
9
|
import { TextUtil } from '../utils/text-util.js';
|
|
9
10
|
|
|
10
11
|
/** A component as `cell info` reports it. Paths are relative to the project root; empty declarations are left out. */
|
|
@@ -347,6 +348,6 @@ export class ProjectInspector {
|
|
|
347
348
|
}
|
|
348
349
|
|
|
349
350
|
protected relative(path: string): string {
|
|
350
|
-
return relative(this.config.root, path);
|
|
351
|
+
return PathUtil.relative(this.config.root, path);
|
|
351
352
|
}
|
|
352
353
|
}
|
|
@@ -3,6 +3,7 @@ import { basename, join, relative, resolve } from 'node:path';
|
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { CellError } from '@celljs/kit';
|
|
5
5
|
import { AgentGuide } from '../agent/agent-guide.js';
|
|
6
|
+
import { PathUtil } from '../utils/path-util.js';
|
|
6
7
|
import { TextUtil } from '../utils/text-util.js';
|
|
7
8
|
|
|
8
9
|
export interface TemplateInfo {
|
|
@@ -89,7 +90,7 @@ export class ProjectInitializer {
|
|
|
89
90
|
renameSync(join(target, rel), renamed);
|
|
90
91
|
}
|
|
91
92
|
writeFileSync(renamed, readFileSync(renamed, 'utf8').replaceAll('{{name}}', name).replaceAll('{{cellVersion}}', this.version));
|
|
92
|
-
files.push(relative(target, renamed));
|
|
93
|
+
files.push(PathUtil.relative(target, renamed));
|
|
93
94
|
}
|
|
94
95
|
files.push(...new AgentGuide(target, this.version).sync([]).files);
|
|
95
96
|
writeFileSync(join(target, 'CLAUDE.md'), '@AGENTS.md\n');
|
|
@@ -4,18 +4,18 @@ import type { CellDevServer } from '@celljs/vite';
|
|
|
4
4
|
import { DevActivity, type LogLevel } from './dev-activity.js';
|
|
5
5
|
import { McpServer } from './mcp-server.js';
|
|
6
6
|
|
|
7
|
-
/** The parts of
|
|
7
|
+
/** The parts of the @celljs/core container the endpoint reads. */
|
|
8
8
|
interface ContainerLike {
|
|
9
9
|
get(id: unknown): unknown;
|
|
10
|
-
|
|
11
|
-
_bindingDictionary?: { getMap(): Map<unknown, BindingLike[]> };
|
|
10
|
+
bindings(): ReadonlyMap<unknown, readonly BindingLike[]>;
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
interface BindingLike {
|
|
15
14
|
type?: string;
|
|
16
15
|
scope?: string;
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
implementation?: { name?: string };
|
|
17
|
+
/** `named x`, `tagged k=v`, `default`. */
|
|
18
|
+
condition?: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
interface RouteLike {
|
|
@@ -224,16 +224,9 @@ export class DevMcpEndpoint {
|
|
|
224
224
|
return container;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
/** Every binding of the container
|
|
228
|
-
protected static entries(container: ContainerLike): [unknown, BindingLike[]][] {
|
|
229
|
-
|
|
230
|
-
for (let c: ContainerLike | null | undefined = container; c; c = c.parent) {
|
|
231
|
-
const map = c._bindingDictionary?.getMap();
|
|
232
|
-
if (map) {
|
|
233
|
-
entries.push(...map.entries());
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
return entries;
|
|
227
|
+
/** Every binding of the container, by identifier. */
|
|
228
|
+
protected static entries(container: ContainerLike): [unknown, readonly BindingLike[]][] {
|
|
229
|
+
return [...container.bindings().entries()];
|
|
237
230
|
}
|
|
238
231
|
|
|
239
232
|
static idName(id: unknown): string {
|
|
@@ -258,12 +251,10 @@ export class DevMcpEndpoint {
|
|
|
258
251
|
const rows = DevMcpEndpoint.entries(this.container()).flatMap(([id, bindings]) =>
|
|
259
252
|
bindings.map(binding => ({
|
|
260
253
|
id: DevMcpEndpoint.idName(id),
|
|
261
|
-
...(binding.
|
|
254
|
+
...(binding.implementation?.name ? { implementation: binding.implementation.name } : {}),
|
|
262
255
|
type: binding.type,
|
|
263
256
|
scope: binding.scope,
|
|
264
|
-
...(binding.constraint
|
|
265
|
-
? { constraint: `${String(binding.constraint.metaData.key)}=${String(binding.constraint.metaData.value)}` }
|
|
266
|
-
: {}),
|
|
257
|
+
...(binding.condition ? { constraint: binding.condition } : {}),
|
|
267
258
|
})),
|
|
268
259
|
);
|
|
269
260
|
const matching = needle ? rows.filter(r => r.id.toLowerCase().includes(needle) || r.implementation?.toLowerCase().includes(needle)) : rows;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { existsSync, mkdtempSync, readFileSync, rmSync } from 'node:fs';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
|
-
import { join
|
|
3
|
+
import { join } from 'node:path';
|
|
4
4
|
import { CellError, type DeployContext, type Deployment, type DeployPlan, type DeployResource, defineDeployer } from '@celljs/kit';
|
|
5
|
+
import { PathUtil } from '../../utils/path-util.js';
|
|
5
6
|
import { Wrangler } from './wrangler.js';
|
|
6
7
|
import { WranglerConfig, type WranglerJson } from './wrangler-config.js';
|
|
7
8
|
|
|
@@ -37,7 +38,7 @@ export class CloudflareDeployment {
|
|
|
37
38
|
deployer: 'cloudflare',
|
|
38
39
|
resources: this.resources(config, result.output),
|
|
39
40
|
details: {
|
|
40
|
-
config: relative(this.context.root, this.file),
|
|
41
|
+
config: PathUtil.relative(this.context.root, this.file),
|
|
41
42
|
wrangler: result.source === 'project' ? 'project' : Wrangler.PACKAGE,
|
|
42
43
|
credentials: this.context.env.CLOUDFLARE_API_TOKEN ? 'CLOUDFLARE_API_TOKEN' : 'wrangler login',
|
|
43
44
|
},
|
|
@@ -3,6 +3,7 @@ import { basename, join, relative, resolve } from 'node:path';
|
|
|
3
3
|
import { CellError, type OutputManifest } from '@celljs/kit';
|
|
4
4
|
import { ConfigUtil } from '@celljs/vite';
|
|
5
5
|
import { JsonUtil } from '../../utils/json-util.js';
|
|
6
|
+
import { PathUtil } from '../../utils/path-util.js';
|
|
6
7
|
|
|
7
8
|
export type WranglerJson = Record<string, unknown>;
|
|
8
9
|
|
|
@@ -166,7 +167,7 @@ export class WranglerConfig {
|
|
|
166
167
|
return { not_found_handling: 'single-page-application', ...assets, directory: manifest.public };
|
|
167
168
|
}
|
|
168
169
|
if (typeof assets?.directory === 'string') {
|
|
169
|
-
return { ...assets, directory: relative(outDir, resolve(this.root, assets.directory)) || '.' };
|
|
170
|
+
return { ...assets, directory: PathUtil.relative(outDir, resolve(this.root, assets.directory)) || '.' };
|
|
170
171
|
}
|
|
171
172
|
return assets;
|
|
172
173
|
}
|
|
@@ -115,7 +115,7 @@ export class FcDeployment {
|
|
|
115
115
|
|
|
116
116
|
async plan(): Promise<DeployPlan> {
|
|
117
117
|
this.checkOutput();
|
|
118
|
-
const code = CodePackage.of(this.context.outDir);
|
|
118
|
+
const code = CodePackage.of(this.context.outDir, this.context.manifest);
|
|
119
119
|
let exists: { fn?: boolean; trigger?: boolean } = {};
|
|
120
120
|
if (this.credentials) {
|
|
121
121
|
const client = new FcClient(this.region, this.credentials, this.io);
|
|
@@ -165,7 +165,7 @@ export class FcDeployment {
|
|
|
165
165
|
throw CloudCredentials.missing('Alibaba Cloud', FcDeployment.CREDENTIALS, ' (an AccessKey of a RAM user with AliyunFCFullAccess)');
|
|
166
166
|
}
|
|
167
167
|
const client = new FcClient(this.region, this.credentials, this.io);
|
|
168
|
-
const code = CodePackage.of(this.context.outDir);
|
|
168
|
+
const code = CodePackage.of(this.context.outDir, this.context.manifest);
|
|
169
169
|
code.checkSize(FcDeployment.MAX_PACKAGE, 'Function Compute', 'Keep large packages out of the server bundle (build.external) and the output directory.');
|
|
170
170
|
const config = this.functionConfig(code);
|
|
171
171
|
const path = `/${FcClient.VERSION}/functions/${this.name}`;
|
|
@@ -111,7 +111,7 @@ export class LambdaDeployment {
|
|
|
111
111
|
|
|
112
112
|
async plan(): Promise<DeployPlan> {
|
|
113
113
|
this.checkOutput();
|
|
114
|
-
const code = CodePackage.of(this.context.outDir);
|
|
114
|
+
const code = CodePackage.of(this.context.outDir, this.context.manifest);
|
|
115
115
|
let fn: boolean | undefined;
|
|
116
116
|
let url: boolean | undefined;
|
|
117
117
|
if (this.credentials) {
|
|
@@ -151,7 +151,7 @@ export class LambdaDeployment {
|
|
|
151
151
|
throw CloudCredentials.missing('AWS', LambdaDeployment.CREDENTIALS, ', or a profile in ~/.aws/credentials (AWS_PROFILE)');
|
|
152
152
|
}
|
|
153
153
|
const client = new AwsClient(this.region, this.credentials, this.io);
|
|
154
|
-
const code = CodePackage.of(this.context.outDir);
|
|
154
|
+
const code = CodePackage.of(this.context.outDir, this.context.manifest);
|
|
155
155
|
code.checkSize(LambdaDeployment.MAX_PACKAGE, 'Lambda', 'Keep large packages out of the server bundle and the output directory.');
|
|
156
156
|
const path = `/2015-03-31/functions/${this.name}`;
|
|
157
157
|
if (await this.optional(() => client.lambda('GET', path), 'GetFunction')) {
|
|
@@ -32,6 +32,7 @@ export namespace PresetOutput {
|
|
|
32
32
|
return manifest;
|
|
33
33
|
}
|
|
34
34
|
const files = new Set(manifest.files ?? []);
|
|
35
|
+
const executables = new Set(manifest.executables ?? []);
|
|
35
36
|
await preset.output({
|
|
36
37
|
...options,
|
|
37
38
|
options: options.options ?? {},
|
|
@@ -40,15 +41,22 @@ export namespace PresetOutput {
|
|
|
40
41
|
const file = join(options.outDir, path);
|
|
41
42
|
mkdirSync(dirname(file), { recursive: true });
|
|
42
43
|
writeFileSync(file, content);
|
|
44
|
+
const name = path.replace(/\\/g, '/');
|
|
43
45
|
if (mode !== undefined) {
|
|
44
46
|
chmodSync(file, mode);
|
|
47
|
+
if (mode & 0o111) {
|
|
48
|
+
executables.add(name);
|
|
49
|
+
}
|
|
45
50
|
}
|
|
46
|
-
files.add(
|
|
51
|
+
files.add(name);
|
|
47
52
|
},
|
|
48
53
|
});
|
|
49
54
|
if (files.size > 0) {
|
|
50
55
|
manifest.files = [...files].sort();
|
|
51
56
|
}
|
|
57
|
+
if (executables.size > 0) {
|
|
58
|
+
manifest.executables = [...executables].sort();
|
|
59
|
+
}
|
|
52
60
|
writeFileSync(join(options.outDir, MANIFEST), `${JSON.stringify(manifest, null, 2)}\n`);
|
|
53
61
|
return manifest;
|
|
54
62
|
}
|
|
@@ -89,7 +89,7 @@ export class ScfDeployment {
|
|
|
89
89
|
|
|
90
90
|
async plan(): Promise<DeployPlan> {
|
|
91
91
|
this.checkOutput();
|
|
92
|
-
const code = CodePackage.of(this.context.outDir);
|
|
92
|
+
const code = CodePackage.of(this.context.outDir, this.context.manifest);
|
|
93
93
|
let fn: boolean | undefined;
|
|
94
94
|
let url: boolean | undefined;
|
|
95
95
|
if (this.credentials) {
|
|
@@ -130,7 +130,7 @@ export class ScfDeployment {
|
|
|
130
130
|
throw CloudCredentials.missing('Tencent Cloud', ScfDeployment.CREDENTIALS, ' (an API key of a sub-user with QcloudSCFFullAccess)');
|
|
131
131
|
}
|
|
132
132
|
const client = new ScfClient(this.region, this.credentials, this.io);
|
|
133
|
-
const code = CodePackage.of(this.context.outDir);
|
|
133
|
+
const code = CodePackage.of(this.context.outDir, this.context.manifest);
|
|
134
134
|
code.checkSize(
|
|
135
135
|
ScfDeployment.MAX_PACKAGE,
|
|
136
136
|
'SCF',
|
|
@@ -45,6 +45,7 @@ export class FixtureProject {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
dispose(): void {
|
|
48
|
-
|
|
48
|
+
// Windows keeps the files of a process that was just killed busy for a moment.
|
|
49
|
+
rmSync(this.root, { recursive: true, force: true, maxRetries: 10, retryDelay: 200 });
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { relative as nativeRelative, sep } from 'node:path';
|
|
2
|
+
|
|
3
|
+
export namespace PathUtil {
|
|
4
|
+
/** `path.relative` with `/` on every platform: paths in JSON and compiler-style output read the same on Windows. */
|
|
5
|
+
export function relative(from: string, to: string): string {
|
|
6
|
+
return nativeRelative(from, to).split(sep).join('/');
|
|
7
|
+
}
|
|
8
|
+
}
|