teraslice 0.92.0 → 0.93.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/cluster-service.js +5 -7
- package/dist/src/index.js +5 -34
- package/jest.config.js +19 -2
- package/package.json +2 -1
- package/service.js +7 -10
- package/worker-service.js +8 -10
package/cluster-service.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const { ClusterMaster } = require('./dist/src/lib/cluster/cluster_master');
|
|
7
|
-
const { AssetsService } = require('./dist/src/lib/cluster/services');
|
|
1
|
+
import { get, logError } from '@terascope/utils';
|
|
2
|
+
import { shutdownHandler } from './dist/src/lib/workers/helpers/worker-shutdown.js';
|
|
3
|
+
import { makeTerafoundationContext } from './dist/src/lib/workers/context/terafoundation-context.js';
|
|
4
|
+
import { ClusterMaster } from './dist/src/lib/cluster/cluster_master.js';
|
|
5
|
+
import { AssetsService } from './dist/src/lib/cluster/services/index.js';
|
|
8
6
|
|
|
9
7
|
class Service {
|
|
10
8
|
constructor(context) {
|
package/dist/src/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* Export of internal components and functions of teraslice.
|
|
4
3
|
*
|
|
@@ -6,37 +5,9 @@
|
|
|
6
5
|
* Since these are internal components, breaking changes may occur if using them.
|
|
7
6
|
* For best results teraslice with an exact semver match, i.e "0.38.0".
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
Object.defineProperty(o, k2, desc);
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
-
if (mod && mod.__esModule) return mod;
|
|
27
|
-
var result = {};
|
|
28
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
-
__setModuleDefault(result, mod);
|
|
30
|
-
return result;
|
|
31
|
-
};
|
|
32
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.stores = exports.config = exports.makeTerafoundationContext = exports.initializeTestExecution = void 0;
|
|
34
|
-
const config = __importStar(require("./lib/config"));
|
|
35
|
-
exports.config = config;
|
|
36
|
-
const stores = __importStar(require("./lib/storage"));
|
|
37
|
-
exports.stores = stores;
|
|
38
|
-
const terafoundation_context_1 = require("./lib/workers/context/terafoundation-context");
|
|
39
|
-
Object.defineProperty(exports, "makeTerafoundationContext", { enumerable: true, get: function () { return terafoundation_context_1.makeTerafoundationContext; } });
|
|
40
|
-
const job_1 = require("./lib/workers/helpers/job");
|
|
41
|
-
Object.defineProperty(exports, "initializeTestExecution", { enumerable: true, get: function () { return job_1.initializeTestExecution; } });
|
|
8
|
+
import * as config from './lib/config/index.js';
|
|
9
|
+
import * as stores from './lib/storage/index.js';
|
|
10
|
+
import { makeTerafoundationContext } from './lib/workers/context/terafoundation-context.js';
|
|
11
|
+
import { initializeTestExecution } from './lib/workers/helpers/job.js';
|
|
12
|
+
export { initializeTestExecution, makeTerafoundationContext, config, stores, };
|
|
42
13
|
//# sourceMappingURL=index.js.map
|
package/jest.config.js
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
import path from 'node:path';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
const dirPath = fileURLToPath(new URL('.', import.meta.url));
|
|
5
|
+
const configModulePath = path.join(dirPath, '../../jest.config.base.js');
|
|
6
|
+
|
|
7
|
+
const module = await import(configModulePath);
|
|
8
|
+
|
|
9
|
+
const config = module.default(dirPath);
|
|
10
|
+
|
|
11
|
+
config.extensionsToTreatAsEsm = ['.ts'];
|
|
12
|
+
config.moduleNameMapper = {
|
|
13
|
+
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
14
|
+
};
|
|
15
|
+
config.testTimeout = 60 * 1000;
|
|
16
|
+
config.transform = {};
|
|
17
|
+
|
|
18
|
+
config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest';
|
|
19
|
+
|
|
20
|
+
export default config;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "teraslice",
|
|
3
3
|
"displayName": "Teraslice",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.93.0",
|
|
5
5
|
"description": "Distributed computing platform for processing JSON data",
|
|
6
6
|
"homepage": "https://github.com/terascope/teraslice#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"license": "Apache-2.0",
|
|
15
15
|
"author": "Terascope, LLC <info@terascope.io>",
|
|
16
|
+
"type": "module",
|
|
16
17
|
"main": "dist/src/index.js",
|
|
17
18
|
"typings": "dist/src/index.d.ts",
|
|
18
19
|
"files": [
|
package/service.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const { safeEncode, safeDecode } = require('./dist/src/lib/utils/encoding_utils');
|
|
8
|
-
const { nodeMaster } = require('./dist/src/lib/cluster/node_master');
|
|
9
|
-
const { getTerasliceConfig } = require('./dist/src/lib/config');
|
|
2
|
+
import util from 'node:util';
|
|
3
|
+
import { ClusterContext } from 'terafoundation';
|
|
4
|
+
import { safeEncode, safeDecode } from './dist/src/lib/utils/encoding_utils.js';
|
|
5
|
+
import { nodeMaster } from './dist/src/lib/cluster/node_master.js';
|
|
6
|
+
import { getTerasliceConfig } from './dist/src/lib/config/index.js';
|
|
10
7
|
|
|
11
8
|
const assignment = process.env.assignment || process.env.NODE_TYPE;
|
|
12
9
|
|
|
@@ -20,12 +17,12 @@ if (['execution_controller', 'worker'].includes(assignment)) {
|
|
|
20
17
|
process.env.EX = safeEncode(JSON.parse(process.env.job));
|
|
21
18
|
}
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
import('./worker-service.js');
|
|
24
21
|
} else if (['cluster_master', 'assets_service'].includes(assignment)) {
|
|
25
22
|
process.env.assignment = assignment;
|
|
26
23
|
process.env.NODE_TYPE = assignment;
|
|
27
24
|
|
|
28
|
-
|
|
25
|
+
import('./cluster-service.js');
|
|
29
26
|
} else {
|
|
30
27
|
process.env.assignment = 'node_master';
|
|
31
28
|
process.env.NODE_TYPE = 'node_master';
|
package/worker-service.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const {
|
|
1
|
+
import {
|
|
4
2
|
logError, get, isEmpty, isPlainObject
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
} from '@terascope/utils';
|
|
4
|
+
import { shutdownHandler } from './dist/src/lib/workers/helpers/worker-shutdown.js';
|
|
5
|
+
import { safeDecode } from './dist/src/lib/utils/encoding_utils.js';
|
|
6
|
+
import { makeExecutionContext } from './dist/src/lib/workers/context/execution-context.js';
|
|
7
|
+
import { makeTerafoundationContext } from './dist/src/lib/workers/context/terafoundation-context.js';
|
|
8
|
+
import { ExecutionController } from './dist/src/lib/workers/execution-controller/index.js';
|
|
9
|
+
import { Worker } from './dist/src/lib/workers/worker/index.js';
|
|
12
10
|
|
|
13
11
|
class Service {
|
|
14
12
|
constructor(context) {
|