@opennextjs/cloudflare 1.3.0 → 1.4.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/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.js +37 -19
- package/dist/cli/build/build.d.ts +2 -2
- package/dist/cli/build/build.js +3 -0
- package/dist/cli/build/open-next/compile-images.d.ts +5 -0
- package/dist/cli/build/open-next/compile-images.js +29 -0
- package/dist/cli/build/open-next/compile-init.js +0 -21
- package/dist/cli/build/open-next/createServerBundle.js +0 -1
- package/dist/cli/build/patches/plugins/next-server.d.ts +0 -2
- package/dist/cli/build/patches/plugins/next-server.js +0 -19
- package/dist/cli/build/utils/workerd.js +3 -1
- package/dist/cli/templates/images.d.ts +24 -0
- package/dist/cli/templates/images.js +82 -0
- package/dist/cli/templates/init.d.ts +0 -17
- package/dist/cli/templates/init.js +0 -76
- package/dist/cli/templates/worker.js +3 -1
- package/package.json +2 -2
- package/templates/open-next.config.ts +1 -1
- package/templates/wrangler.jsonc +20 -20
- package/dist/api/durable-objects/bucket-cache-purge.spec.d.ts +0 -1
- package/dist/api/durable-objects/bucket-cache-purge.spec.js +0 -121
- package/dist/api/durable-objects/queue.spec.d.ts +0 -1
- package/dist/api/durable-objects/queue.spec.js +0 -287
- package/dist/api/durable-objects/sharded-tag-cache.spec.d.ts +0 -1
- package/dist/api/durable-objects/sharded-tag-cache.spec.js +0 -37
- package/dist/api/overrides/queue/memory-queue.spec.d.ts +0 -1
- package/dist/api/overrides/queue/memory-queue.spec.js +0 -76
- package/dist/api/overrides/queue/queue-cache.spec.d.ts +0 -1
- package/dist/api/overrides/queue/queue-cache.spec.js +0 -92
- package/dist/api/overrides/tag-cache/do-sharded-tag-cache.spec.d.ts +0 -1
- package/dist/api/overrides/tag-cache/do-sharded-tag-cache.spec.js +0 -413
- package/dist/api/overrides/tag-cache/tag-cache-filter.spec.d.ts +0 -1
- package/dist/api/overrides/tag-cache/tag-cache-filter.spec.js +0 -97
- package/dist/cli/build/patches/ast/patch-vercel-og-library.spec.d.ts +0 -1
- package/dist/cli/build/patches/ast/patch-vercel-og-library.spec.js +0 -50
- package/dist/cli/build/patches/ast/vercel-og.spec.d.ts +0 -1
- package/dist/cli/build/patches/ast/vercel-og.spec.js +0 -22
- package/dist/cli/build/patches/ast/webpack-runtime.spec.d.ts +0 -1
- package/dist/cli/build/patches/ast/webpack-runtime.spec.js +0 -102
- package/dist/cli/build/patches/plugins/instrumentation.spec.d.ts +0 -1
- package/dist/cli/build/patches/plugins/instrumentation.spec.js +0 -91
- package/dist/cli/build/patches/plugins/next-server.spec.d.ts +0 -1
- package/dist/cli/build/patches/plugins/next-server.spec.js +0 -216
- package/dist/cli/build/patches/plugins/patch-depd-deprecations.spec.d.ts +0 -1
- package/dist/cli/build/patches/plugins/patch-depd-deprecations.spec.js +0 -29
- package/dist/cli/build/patches/plugins/res-revalidate.spec.d.ts +0 -1
- package/dist/cli/build/patches/plugins/res-revalidate.spec.js +0 -99
- package/dist/cli/build/patches/plugins/use-cache.spec.d.ts +0 -1
- package/dist/cli/build/patches/plugins/use-cache.spec.js +0 -101
- package/dist/cli/build/utils/extract-project-env-vars.spec.d.ts +0 -1
- package/dist/cli/build/utils/extract-project-env-vars.spec.js +0 -67
- package/dist/cli/build/utils/workerd.spec.d.ts +0 -1
- package/dist/cli/build/utils/workerd.spec.js +0 -188
- package/dist/cli/commands/populate-cache.spec.d.ts +0 -1
- package/dist/cli/commands/populate-cache.spec.js +0 -61
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "vitest";
|
|
2
|
-
import { computePatchDiff } from "../../utils/test-patch.js";
|
|
3
|
-
import { rule } from "./use-cache.js";
|
|
4
|
-
const code = `"use strict";
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
0 && (module.exports = {
|
|
9
|
-
bindSnapshot: null,
|
|
10
|
-
createAsyncLocalStorage: null,
|
|
11
|
-
createSnapshot: null
|
|
12
|
-
});
|
|
13
|
-
function _export(target, all) {
|
|
14
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: all[name]
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
_export(exports, {
|
|
20
|
-
bindSnapshot: function() {
|
|
21
|
-
return bindSnapshot;
|
|
22
|
-
},
|
|
23
|
-
createAsyncLocalStorage: function() {
|
|
24
|
-
return createAsyncLocalStorage;
|
|
25
|
-
},
|
|
26
|
-
createSnapshot: function() {
|
|
27
|
-
return createSnapshot;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
const sharedAsyncLocalStorageNotAvailableError = Object.defineProperty(new Error('Invariant: AsyncLocalStorage accessed in runtime where it is not available'), "__NEXT_ERROR_CODE", {
|
|
31
|
-
value: "E504",
|
|
32
|
-
enumerable: false,
|
|
33
|
-
configurable: true
|
|
34
|
-
});
|
|
35
|
-
class FakeAsyncLocalStorage {
|
|
36
|
-
disable() {
|
|
37
|
-
throw sharedAsyncLocalStorageNotAvailableError;
|
|
38
|
-
}
|
|
39
|
-
getStore() {
|
|
40
|
-
// This fake implementation of AsyncLocalStorage always returns \`undefined\`.
|
|
41
|
-
return undefined;
|
|
42
|
-
}
|
|
43
|
-
run() {
|
|
44
|
-
throw sharedAsyncLocalStorageNotAvailableError;
|
|
45
|
-
}
|
|
46
|
-
exit() {
|
|
47
|
-
throw sharedAsyncLocalStorageNotAvailableError;
|
|
48
|
-
}
|
|
49
|
-
enterWith() {
|
|
50
|
-
throw sharedAsyncLocalStorageNotAvailableError;
|
|
51
|
-
}
|
|
52
|
-
static bind(fn) {
|
|
53
|
-
return fn;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
const maybeGlobalAsyncLocalStorage = typeof globalThis !== 'undefined' && globalThis.AsyncLocalStorage;
|
|
57
|
-
function createAsyncLocalStorage() {
|
|
58
|
-
if (maybeGlobalAsyncLocalStorage) {
|
|
59
|
-
return new maybeGlobalAsyncLocalStorage();
|
|
60
|
-
}
|
|
61
|
-
return new FakeAsyncLocalStorage();
|
|
62
|
-
}
|
|
63
|
-
function bindSnapshot(fn) {
|
|
64
|
-
if (maybeGlobalAsyncLocalStorage) {
|
|
65
|
-
return maybeGlobalAsyncLocalStorage.bind(fn);
|
|
66
|
-
}
|
|
67
|
-
return FakeAsyncLocalStorage.bind(fn);
|
|
68
|
-
}
|
|
69
|
-
function createSnapshot() {
|
|
70
|
-
if (maybeGlobalAsyncLocalStorage) {
|
|
71
|
-
return maybeGlobalAsyncLocalStorage.snapshot();
|
|
72
|
-
}
|
|
73
|
-
return function(fn, ...args) {
|
|
74
|
-
return fn(...args);
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
//# sourceMappingURL=async-local-storage.js.map
|
|
79
|
-
`;
|
|
80
|
-
test("patch the createSnapshot function", () => {
|
|
81
|
-
expect(computePatchDiff("async-local-storage.js", code, rule)).toMatchInlineSnapshot(`
|
|
82
|
-
"Index: async-local-storage.js
|
|
83
|
-
===================================================================
|
|
84
|
-
--- async-local-storage.js
|
|
85
|
-
+++ async-local-storage.js
|
|
86
|
-
@@ -63,11 +63,9 @@
|
|
87
|
-
}
|
|
88
|
-
return FakeAsyncLocalStorage.bind(fn);
|
|
89
|
-
}
|
|
90
|
-
function createSnapshot() {
|
|
91
|
-
- if (maybeGlobalAsyncLocalStorage) {
|
|
92
|
-
- return maybeGlobalAsyncLocalStorage.snapshot();
|
|
93
|
-
- }
|
|
94
|
-
+ // Ignored snapshot
|
|
95
|
-
return function(fn, ...args) {
|
|
96
|
-
return fn(...args);
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
"
|
|
100
|
-
`);
|
|
101
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { appendFileSync, writeFileSync } from "node:fs";
|
|
2
|
-
import mockFs from "mock-fs";
|
|
3
|
-
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
4
|
-
import { extractProjectEnvVars } from "./extract-project-env-vars.js";
|
|
5
|
-
const options = { monorepoRoot: "", appPath: "" };
|
|
6
|
-
describe("extractProjectEnvVars", () => {
|
|
7
|
-
beforeEach(() => {
|
|
8
|
-
mockFs({
|
|
9
|
-
".env": "ENV_VAR=value",
|
|
10
|
-
".env.local": "ENV_LOCAL_VAR=value",
|
|
11
|
-
".env.test": "ENV_TEST_VAR=value",
|
|
12
|
-
".env.test.local": "ENV_TEST_LOCAL_VAR=value",
|
|
13
|
-
".env.development": "ENV_DEV_VAR=value",
|
|
14
|
-
".env.development.local": "ENV_DEV_LOCAL_VAR=value",
|
|
15
|
-
".env.production": "ENV_PROD_VAR=value",
|
|
16
|
-
".env.production.local": "ENV_PROD_LOCAL_VAR=value",
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
afterEach(() => mockFs.restore());
|
|
20
|
-
it("should extract production env vars", () => {
|
|
21
|
-
const result = extractProjectEnvVars("production", options);
|
|
22
|
-
expect(result).toEqual({
|
|
23
|
-
ENV_LOCAL_VAR: "value",
|
|
24
|
-
ENV_PROD_LOCAL_VAR: "value",
|
|
25
|
-
ENV_PROD_VAR: "value",
|
|
26
|
-
ENV_VAR: "value",
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
it("should extract development env vars", () => {
|
|
30
|
-
writeFileSync(".dev.vars", 'NEXTJS_ENV = "development"');
|
|
31
|
-
const result = extractProjectEnvVars("development", options);
|
|
32
|
-
expect(result).toEqual({
|
|
33
|
-
ENV_LOCAL_VAR: "value",
|
|
34
|
-
ENV_DEV_LOCAL_VAR: "value",
|
|
35
|
-
ENV_DEV_VAR: "value",
|
|
36
|
-
ENV_VAR: "value",
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
it("should override env vars with those in a local file", () => {
|
|
40
|
-
writeFileSync(".env.production.local", "ENV_PROD_VAR=overridden");
|
|
41
|
-
const result = extractProjectEnvVars("production", options);
|
|
42
|
-
expect(result).toEqual({
|
|
43
|
-
ENV_LOCAL_VAR: "value",
|
|
44
|
-
ENV_PROD_VAR: "overridden",
|
|
45
|
-
ENV_VAR: "value",
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
it("should support referencing variables", () => {
|
|
49
|
-
appendFileSync(".env.production.local", "\nENV_PROD_LOCAL_VAR_REF=$ENV_PROD_LOCAL_VAR");
|
|
50
|
-
const result = extractProjectEnvVars("production", options);
|
|
51
|
-
expect(result).toEqual({
|
|
52
|
-
ENV_LOCAL_VAR: "value",
|
|
53
|
-
ENV_PROD_LOCAL_VAR: "value",
|
|
54
|
-
ENV_PROD_LOCAL_VAR_REF: "value",
|
|
55
|
-
ENV_PROD_VAR: "value",
|
|
56
|
-
ENV_VAR: "value",
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
it("should exclude .env.local files when extracting test env vars", () => {
|
|
60
|
-
const result = extractProjectEnvVars("test", options);
|
|
61
|
-
expect(result).toEqual({
|
|
62
|
-
ENV_TEST_LOCAL_VAR: "value",
|
|
63
|
-
ENV_TEST_VAR: "value",
|
|
64
|
-
ENV_VAR: "value",
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { describe, expect, test } from "vitest";
|
|
2
|
-
import { transformBuildCondition, transformPackageJson } from "./workerd";
|
|
3
|
-
describe("transformBuildCondition", () => {
|
|
4
|
-
test("top level", () => {
|
|
5
|
-
const exports = {
|
|
6
|
-
workerd: "./path/to/workerd.js",
|
|
7
|
-
default: "./path/to/default.js",
|
|
8
|
-
};
|
|
9
|
-
const workerd = transformBuildCondition(exports, "workerd");
|
|
10
|
-
const defaultExport = transformBuildCondition(exports, "default");
|
|
11
|
-
const moduleExport = transformBuildCondition(exports, "module");
|
|
12
|
-
expect(workerd.hasBuildCondition).toBe(true);
|
|
13
|
-
expect(workerd.transformedExports).toEqual({
|
|
14
|
-
workerd: "./path/to/workerd.js",
|
|
15
|
-
});
|
|
16
|
-
expect(defaultExport.hasBuildCondition).toBe(true);
|
|
17
|
-
expect(defaultExport.transformedExports).toEqual({
|
|
18
|
-
default: "./path/to/default.js",
|
|
19
|
-
});
|
|
20
|
-
expect(moduleExport.hasBuildCondition).toBe(false);
|
|
21
|
-
expect(moduleExport.transformedExports).toEqual({
|
|
22
|
-
workerd: "./path/to/workerd.js",
|
|
23
|
-
default: "./path/to/default.js",
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
test("nested", () => {
|
|
27
|
-
const exports = {
|
|
28
|
-
".": "/path/to/index.js",
|
|
29
|
-
"./server": {
|
|
30
|
-
"react-server": {
|
|
31
|
-
workerd: "./server.edge.js",
|
|
32
|
-
other: "./server.js",
|
|
33
|
-
},
|
|
34
|
-
default: "./server.js",
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
const workerd = transformBuildCondition(exports, "workerd");
|
|
38
|
-
const defaultExport = transformBuildCondition(exports, "default");
|
|
39
|
-
const moduleExport = transformBuildCondition(exports, "module");
|
|
40
|
-
expect(workerd.hasBuildCondition).toBe(true);
|
|
41
|
-
expect(workerd.transformedExports).toEqual({
|
|
42
|
-
".": "/path/to/index.js",
|
|
43
|
-
"./server": {
|
|
44
|
-
"react-server": {
|
|
45
|
-
workerd: "./server.edge.js",
|
|
46
|
-
},
|
|
47
|
-
default: "./server.js",
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
expect(defaultExport.hasBuildCondition).toBe(true);
|
|
51
|
-
expect(defaultExport.transformedExports).toEqual({
|
|
52
|
-
".": "/path/to/index.js",
|
|
53
|
-
"./server": {
|
|
54
|
-
"react-server": {
|
|
55
|
-
workerd: "./server.edge.js",
|
|
56
|
-
other: "./server.js",
|
|
57
|
-
},
|
|
58
|
-
default: "./server.js",
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
expect(moduleExport.hasBuildCondition).toBe(false);
|
|
62
|
-
expect(moduleExport.transformedExports).toEqual({
|
|
63
|
-
".": "/path/to/index.js",
|
|
64
|
-
"./server": {
|
|
65
|
-
"react-server": {
|
|
66
|
-
workerd: "./server.edge.js",
|
|
67
|
-
other: "./server.js",
|
|
68
|
-
},
|
|
69
|
-
default: "./server.js",
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
test("only consider leaves", () => {
|
|
74
|
-
const exports = {
|
|
75
|
-
".": "/path/to/index.js",
|
|
76
|
-
"./server": {
|
|
77
|
-
workerd: {
|
|
78
|
-
default: "./server.edge.js",
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
const workerd = transformBuildCondition(exports, "workerd");
|
|
83
|
-
expect(workerd.hasBuildCondition).toBe(false);
|
|
84
|
-
expect(workerd.transformedExports).toEqual({
|
|
85
|
-
".": "/path/to/index.js",
|
|
86
|
-
"./server": {
|
|
87
|
-
workerd: {
|
|
88
|
-
default: "./server.edge.js",
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
describe("transformPackageJson", () => {
|
|
95
|
-
test("no exports nor imports", () => {
|
|
96
|
-
const json = {
|
|
97
|
-
name: "test",
|
|
98
|
-
main: "index.js",
|
|
99
|
-
version: "1.0.0",
|
|
100
|
-
description: "test package",
|
|
101
|
-
};
|
|
102
|
-
const { transformed, hasBuildCondition } = transformPackageJson(json);
|
|
103
|
-
expect(transformed).toEqual(json);
|
|
104
|
-
expect(hasBuildCondition).toBe(false);
|
|
105
|
-
});
|
|
106
|
-
test("exports only with no workerd condition", () => {
|
|
107
|
-
const json = {
|
|
108
|
-
name: "test",
|
|
109
|
-
exports: {
|
|
110
|
-
".": "./index.js",
|
|
111
|
-
"./server": "./server.js",
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
const { transformed, hasBuildCondition } = transformPackageJson(json);
|
|
115
|
-
expect(transformed).toEqual(json);
|
|
116
|
-
expect(hasBuildCondition).toBe(false);
|
|
117
|
-
});
|
|
118
|
-
test("exports only with nested workerd condition", () => {
|
|
119
|
-
const json = {
|
|
120
|
-
name: "test",
|
|
121
|
-
exports: {
|
|
122
|
-
".": "./index.js",
|
|
123
|
-
"./server": {
|
|
124
|
-
workerd: "./server.edge.js",
|
|
125
|
-
other: "./server.js",
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
};
|
|
129
|
-
const { transformed, hasBuildCondition } = transformPackageJson(json);
|
|
130
|
-
expect(transformed).toEqual({
|
|
131
|
-
name: "test",
|
|
132
|
-
exports: {
|
|
133
|
-
".": "./index.js",
|
|
134
|
-
"./server": {
|
|
135
|
-
workerd: "./server.edge.js",
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
});
|
|
139
|
-
expect(hasBuildCondition).toBe(true);
|
|
140
|
-
});
|
|
141
|
-
test("imports only with top level workerd condition", () => {
|
|
142
|
-
const json = {
|
|
143
|
-
name: "test",
|
|
144
|
-
imports: {
|
|
145
|
-
workerd: "./server.edge.js",
|
|
146
|
-
default: "./server.js",
|
|
147
|
-
},
|
|
148
|
-
};
|
|
149
|
-
const { transformed, hasBuildCondition } = transformPackageJson(json);
|
|
150
|
-
expect(transformed).toEqual({
|
|
151
|
-
name: "test",
|
|
152
|
-
imports: {
|
|
153
|
-
workerd: "./server.edge.js",
|
|
154
|
-
},
|
|
155
|
-
});
|
|
156
|
-
expect(hasBuildCondition).toBe(true);
|
|
157
|
-
});
|
|
158
|
-
test("exports and imports with workerd condition both nested and top level", () => {
|
|
159
|
-
const json = {
|
|
160
|
-
name: "test",
|
|
161
|
-
exports: {
|
|
162
|
-
".": "./index.js",
|
|
163
|
-
"./server": {
|
|
164
|
-
workerd: "./server.edge.js",
|
|
165
|
-
other: "./server.js",
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
imports: {
|
|
169
|
-
workerd: "./server.edge.js",
|
|
170
|
-
default: "./server.js",
|
|
171
|
-
},
|
|
172
|
-
};
|
|
173
|
-
const { transformed, hasBuildCondition } = transformPackageJson(json);
|
|
174
|
-
expect(transformed).toEqual({
|
|
175
|
-
name: "test",
|
|
176
|
-
exports: {
|
|
177
|
-
".": "./index.js",
|
|
178
|
-
"./server": {
|
|
179
|
-
workerd: "./server.edge.js",
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
imports: {
|
|
183
|
-
workerd: "./server.edge.js",
|
|
184
|
-
},
|
|
185
|
-
});
|
|
186
|
-
expect(hasBuildCondition).toBe(true);
|
|
187
|
-
});
|
|
188
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import mockFs from "mock-fs";
|
|
4
|
-
import { afterAll, beforeAll, describe, expect, test } from "vitest";
|
|
5
|
-
import { getCacheAssets } from "./populate-cache";
|
|
6
|
-
describe("getCacheAssets", () => {
|
|
7
|
-
beforeAll(() => {
|
|
8
|
-
mockFs();
|
|
9
|
-
const fetchBaseDir = "/base/path/cache/__fetch/buildID";
|
|
10
|
-
const cacheDir = "/base/path/cache/buildID/path/to";
|
|
11
|
-
mkdirSync(fetchBaseDir, { recursive: true });
|
|
12
|
-
mkdirSync(cacheDir, { recursive: true });
|
|
13
|
-
for (let i = 0; i < 3; i++) {
|
|
14
|
-
writeFileSync(path.join(fetchBaseDir, `${i}`), "", { encoding: "utf-8" });
|
|
15
|
-
writeFileSync(path.join(cacheDir, `${i}.cache`), "", { encoding: "utf-8" });
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
afterAll(() => mockFs.restore());
|
|
19
|
-
test("list cache assets", () => {
|
|
20
|
-
expect(getCacheAssets({ outputDir: "/base/path" })).toMatchInlineSnapshot(`
|
|
21
|
-
[
|
|
22
|
-
{
|
|
23
|
-
"buildId": "buildID",
|
|
24
|
-
"fullPath": "/base/path/cache/buildID/path/to/2.cache",
|
|
25
|
-
"isFetch": false,
|
|
26
|
-
"key": "/path/to/2",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"buildId": "buildID",
|
|
30
|
-
"fullPath": "/base/path/cache/buildID/path/to/1.cache",
|
|
31
|
-
"isFetch": false,
|
|
32
|
-
"key": "/path/to/1",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"buildId": "buildID",
|
|
36
|
-
"fullPath": "/base/path/cache/buildID/path/to/0.cache",
|
|
37
|
-
"isFetch": false,
|
|
38
|
-
"key": "/path/to/0",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"buildId": "buildID",
|
|
42
|
-
"fullPath": "/base/path/cache/__fetch/buildID/2",
|
|
43
|
-
"isFetch": true,
|
|
44
|
-
"key": "/2",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"buildId": "buildID",
|
|
48
|
-
"fullPath": "/base/path/cache/__fetch/buildID/1",
|
|
49
|
-
"isFetch": true,
|
|
50
|
-
"key": "/1",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"buildId": "buildID",
|
|
54
|
-
"fullPath": "/base/path/cache/__fetch/buildID/0",
|
|
55
|
-
"isFetch": true,
|
|
56
|
-
"key": "/0",
|
|
57
|
-
},
|
|
58
|
-
]
|
|
59
|
-
`);
|
|
60
|
-
});
|
|
61
|
-
});
|