@lage-run/scheduler 1.5.19 → 1.5.20
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.
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "createCache", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _cache = require("@lage-run/cache");
|
|
12
|
-
const
|
|
12
|
+
const _config = require("@lage-run/config");
|
|
13
13
|
async function createCache(options) {
|
|
14
14
|
const { cacheOptions, logger, root, skipLocalCache } = options;
|
|
15
15
|
const hasRemoteCacheConfig = !!cacheOptions?.cacheStorageConfig || !!process.env.BACKFILL_CACHE_PROVIDER || !!process.env.BACKFILL_CACHE_PROVIDER_OPTIONS;
|
|
@@ -35,7 +35,7 @@ async function createCache(options) {
|
|
|
35
35
|
root,
|
|
36
36
|
cacheOptions: cacheOptions ?? {}
|
|
37
37
|
}) : undefined,
|
|
38
|
-
writeRemoteCache: (cacheOptions?.writeRemoteCache === true || String(process.env.LAGE_WRITE_CACHE).toLowerCase() === "true" ||
|
|
38
|
+
writeRemoteCache: (cacheOptions?.writeRemoteCache === true || String(process.env.LAGE_WRITE_CACHE).toLowerCase() === "true" || _config.isRunningFromCI) && String(process.env.LAGE_WRITE_CACHE).toLowerCase() !== "false"
|
|
39
39
|
});
|
|
40
40
|
return {
|
|
41
41
|
cacheProvider
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cache/createCacheProvider.ts"],"sourcesContent":["import type { CacheOptions } from \"@lage-run/cache\";\nimport { BackfillCacheProvider, RemoteFallbackCacheProvider } from \"@lage-run/cache\";\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/cache/createCacheProvider.ts"],"sourcesContent":["import type { CacheOptions } from \"@lage-run/cache\";\nimport { BackfillCacheProvider, RemoteFallbackCacheProvider } from \"@lage-run/cache\";\nimport { isRunningFromCI } from \"@lage-run/config\";\nimport type { Logger } from \"@lage-run/logger\";\n\ninterface CreateCacheOptions {\n cacheOptions?: CacheOptions;\n logger: Logger;\n root: string;\n skipLocalCache: boolean;\n cliArgs: string[];\n}\n\nexport async function createCache(options: CreateCacheOptions): Promise<{\n cacheProvider: RemoteFallbackCacheProvider;\n}> {\n const { cacheOptions, logger, root, skipLocalCache } = options;\n\n const hasRemoteCacheConfig =\n !!cacheOptions?.cacheStorageConfig || !!process.env.BACKFILL_CACHE_PROVIDER || !!process.env.BACKFILL_CACHE_PROVIDER_OPTIONS;\n\n // Create Cache Provider\n const cacheProvider = new RemoteFallbackCacheProvider({\n root,\n logger,\n localCacheProvider:\n skipLocalCache === true\n ? undefined\n : new BackfillCacheProvider({\n logger,\n root,\n cacheOptions: {\n outputGlob: cacheOptions?.outputGlob,\n ...(cacheOptions?.internalCacheFolder && { internalCacheFolder: cacheOptions.internalCacheFolder }),\n ...(cacheOptions?.incrementalCaching && { incrementalCaching: cacheOptions.incrementalCaching }),\n },\n }),\n remoteCacheProvider: hasRemoteCacheConfig ? new BackfillCacheProvider({ logger, root, cacheOptions: cacheOptions ?? {} }) : undefined,\n writeRemoteCache:\n (cacheOptions?.writeRemoteCache === true || String(process.env.LAGE_WRITE_CACHE).toLowerCase() === \"true\" || isRunningFromCI) &&\n String(process.env.LAGE_WRITE_CACHE).toLowerCase() !== \"false\",\n });\n\n return { cacheProvider };\n}\n"],"names":["createCache","options","cacheOptions","logger","root","skipLocalCache","hasRemoteCacheConfig","cacheStorageConfig","process","env","BACKFILL_CACHE_PROVIDER","BACKFILL_CACHE_PROVIDER_OPTIONS","cacheProvider","RemoteFallbackCacheProvider","localCacheProvider","undefined","BackfillCacheProvider","outputGlob","internalCacheFolder","incrementalCaching","remoteCacheProvider","writeRemoteCache","String","LAGE_WRITE_CACHE","toLowerCase","isRunningFromCI"],"mappings":";;;;+BAasBA;;;eAAAA;;;uBAZ6C;wBACnC;AAWzB,eAAeA,YAAYC,OAA2B;IAG3D,MAAM,EAAEC,YAAY,EAAEC,MAAM,EAAEC,IAAI,EAAEC,cAAc,EAAE,GAAGJ;IAEvD,MAAMK,uBACJ,CAAC,CAACJ,cAAcK,sBAAsB,CAAC,CAACC,QAAQC,GAAG,CAACC,uBAAuB,IAAI,CAAC,CAACF,QAAQC,GAAG,CAACE,+BAA+B;IAE9H,wBAAwB;IACxB,MAAMC,gBAAgB,IAAIC,kCAA2B,CAAC;QACpDT;QACAD;QACAW,oBACET,mBAAmB,OACfU,YACA,IAAIC,4BAAqB,CAAC;YACxBb;YACAC;YACAF,cAAc;gBACZe,YAAYf,cAAce;gBAC1B,GAAIf,cAAcgB,uBAAuB;oBAAEA,qBAAqBhB,aAAagB,mBAAmB;gBAAC,CAAC;gBAClG,GAAIhB,cAAciB,sBAAsB;oBAAEA,oBAAoBjB,aAAaiB,kBAAkB;gBAAC,CAAC;YACjG;QACF;QACNC,qBAAqBd,uBAAuB,IAAIU,4BAAqB,CAAC;YAAEb;YAAQC;YAAMF,cAAcA,gBAAgB,CAAC;QAAE,KAAKa;QAC5HM,kBACE,AAACnB,CAAAA,cAAcmB,qBAAqB,QAAQC,OAAOd,QAAQC,GAAG,CAACc,gBAAgB,EAAEC,WAAW,OAAO,UAAUC,uBAAe,AAAD,KAC3HH,OAAOd,QAAQC,GAAG,CAACc,gBAAgB,EAAEC,WAAW,OAAO;IAC3D;IAEA,OAAO;QAAEZ;IAAc;AACzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lage-run/scheduler",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.20",
|
|
4
4
|
"description": "Scheduler for Lage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
"lint": "monorepo-scripts lint"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@lage-run/cache": "^1.4.
|
|
22
|
-
"@lage-run/config": "^0.9.
|
|
23
|
-
"@lage-run/hasher": "^1.9.
|
|
21
|
+
"@lage-run/cache": "^1.4.8",
|
|
22
|
+
"@lage-run/config": "^0.9.1",
|
|
23
|
+
"@lage-run/hasher": "^1.9.5",
|
|
24
24
|
"@lage-run/logger": "^1.3.3",
|
|
25
|
-
"@lage-run/runners": "^1.
|
|
26
|
-
"@lage-run/target-graph": "^0.
|
|
25
|
+
"@lage-run/runners": "^1.4.0",
|
|
26
|
+
"@lage-run/target-graph": "^0.14.0",
|
|
27
27
|
"@lage-run/worker-threads-pool": "^0.9.3"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@lage-run/monorepo-scripts": "^1.0.0",
|
|
31
|
-
"@lage-run/scheduler-types": "^0.3.
|
|
31
|
+
"@lage-run/scheduler-types": "^0.3.31"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"lib/!(__*)",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isRunningFromCI: boolean;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "isRunningFromCI", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return isRunningFromCI;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const isRunningFromCI = process.env.NODE_ENV !== "test" && (!!process.env.CI || !!process.env.TF_BUILD);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cache/isRunningFromCI.ts"],"sourcesContent":["export const isRunningFromCI: boolean = process.env.NODE_ENV !== \"test\" && (!!process.env.CI || !!process.env.TF_BUILD);\n"],"names":["isRunningFromCI","process","env","NODE_ENV","CI","TF_BUILD"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,kBAA2BC,QAAQC,GAAG,CAACC,QAAQ,KAAK,UAAW,CAAA,CAAC,CAACF,QAAQC,GAAG,CAACE,EAAE,IAAI,CAAC,CAACH,QAAQC,GAAG,CAACG,QAAQ,AAAD"}
|