@graphcommerce/next-config 9.0.3 → 9.0.4-canary.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.
- package/CHANGELOG.md +4 -8
- package/__tests__/commands/copyFiles.ts +8 -5
- package/__tests__/config/utils/mergeEnvIntoConfig.ts +2 -1
- package/__tests__/config/utils/rewriteLegancyEnv.ts +1 -0
- package/__tests__/interceptors/findPlugins.ts +1 -0
- package/__tests__/interceptors/generateInterceptors.ts +1 -0
- package/__tests__/utils/resolveDependenciesSync.ts +1 -0
- package/dist/commands/codegen.js +3 -3
- package/dist/commands/copyFiles.js +12 -7
- package/dist/config/commands/generateConfig.js +1 -2
- package/dist/config/utils/mergeEnvIntoConfig.js +1 -3
- package/dist/generated/config.js +19 -15
- package/dist/interceptors/writeInterceptors.js +1 -1
- package/package.json +3 -1
- package/src/commands/codegen.ts +3 -3
- package/src/commands/copyFiles.ts +14 -7
- package/src/config/commands/generateConfig.ts +1 -2
- package/src/config/utils/mergeEnvIntoConfig.ts +1 -3
- package/src/generated/config.ts +293 -245
- package/src/interceptors/Visitor.ts +1 -1
- package/src/interceptors/findOriginalSource.ts +1 -1
- package/src/interceptors/writeInterceptors.ts +1 -1
- package/src/utils/resolveDependenciesSync.ts +1 -1
- package/dist/commands/copyRoutes.js +0 -20
|
@@ -499,7 +499,7 @@ export class Visitor {
|
|
|
499
499
|
return this.visitExpressionStatement(stmt)
|
|
500
500
|
|
|
501
501
|
default:
|
|
502
|
-
throw new Error(`Unknown statement type: ${(stmt as
|
|
502
|
+
throw new Error(`Unknown statement type: ${(stmt as { type: string }).type}`)
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExportAllDeclaration } from '@swc/core'
|
|
2
1
|
import path from 'path'
|
|
2
|
+
import type { ExportAllDeclaration } from '@swc/core'
|
|
3
3
|
import type { ResolveDependency, ResolveDependencyReturn } from '../utils/resolveDependency'
|
|
4
4
|
import type { PluginConfig } from './generateInterceptor'
|
|
5
5
|
import { parseSync } from './swc'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
|
-
import { sync as globSync } from 'glob'
|
|
3
2
|
import fs from 'node:fs/promises'
|
|
4
3
|
import path from 'path'
|
|
4
|
+
import { sync as globSync } from 'glob'
|
|
5
5
|
import { resolveDependenciesSync } from '../utils/resolveDependenciesSync'
|
|
6
6
|
import type { GenerateInterceptorsReturn } from './generateInterceptors'
|
|
7
7
|
|
|
@@ -2,7 +2,7 @@ import fs from 'node:fs'
|
|
|
2
2
|
import path from 'node:path'
|
|
3
3
|
import type { PackageJson } from 'type-fest'
|
|
4
4
|
import { PackagesSort } from './PackagesSort'
|
|
5
|
-
import {
|
|
5
|
+
import { sig } from './sig'
|
|
6
6
|
|
|
7
7
|
type PackageNames = Map<string, string>
|
|
8
8
|
type DependencyStructure = Record<string, { dirName: string; dependencies: string[] }>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const promises_1 = __importDefault(require("fs/promises"));
|
|
7
|
-
// ... earlier code remains the same ...
|
|
8
|
-
try {
|
|
9
|
-
targetContent = await promises_1.default.readFile(targetPath);
|
|
10
|
-
}
|
|
11
|
-
catch (err) {
|
|
12
|
-
if (err.code !== 'ENOENT')
|
|
13
|
-
throw err;
|
|
14
|
-
// File doesn't exist, log that we're creating it
|
|
15
|
-
console.log(`Creating new file: ${file}`);
|
|
16
|
-
}
|
|
17
|
-
// Skip if content is identical
|
|
18
|
-
if (targetContent && Buffer.compare(sourceContent, targetContent) === 0)
|
|
19
|
-
return;
|
|
20
|
-
// ... rest of the code remains the same ...
|