@axinom/mosaic-db-common 0.13.0 → 0.14.0-rc.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/commands/generate-define-func-migration.d.ts +14 -0
- package/dist/cli/commands/generate-define-func-migration.d.ts.map +1 -0
- package/dist/cli/commands/generate-define-func-migration.js +72 -0
- package/dist/cli/commands/generate-define-func-migration.js.map +1 -0
- package/dist/cli/commands/generate-vscode-sql-snippets.d.ts.map +1 -1
- package/dist/cli/commands/generate-vscode-sql-snippets.js +7 -24
- package/dist/cli/commands/generate-vscode-sql-snippets.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/utils.d.ts +13 -0
- package/dist/cli/commands/utils.d.ts.map +1 -0
- package/dist/cli/commands/utils.js +26 -0
- package/dist/cli/commands/utils.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/migrations/index.d.ts +0 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +0 -3
- package/dist/migrations/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/migrations/create-sql-define-functions-migration.d.ts +0 -16
- package/dist/migrations/create-sql-define-functions-migration.d.ts.map +0 -1
- package/dist/migrations/create-sql-define-functions-migration.js +0 -49
- package/dist/migrations/create-sql-define-functions-migration.js.map +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CommandModule } from 'yargs';
|
|
2
|
+
/**
|
|
3
|
+
* CLI command options object.
|
|
4
|
+
*/
|
|
5
|
+
interface GenerateMigrationOptions {
|
|
6
|
+
includeMultitenancyFunctions: boolean;
|
|
7
|
+
currentMigrationFolderPath: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Yargs command module definition for `generate-define-func-migration` CLI script.
|
|
11
|
+
*/
|
|
12
|
+
export declare const generateDefineFuncMigration: CommandModule<unknown, GenerateMigrationOptions>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=generate-define-func-migration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-define-func-migration.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/generate-define-func-migration.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC;;GAEG;AACH,UAAU,wBAAwB;IAChC,4BAA4B,EAAE,OAAO,CAAC;IACtC,0BAA0B,EAAE,MAAM,CAAC;CACpC;AAkFD;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,aAAa,CACrD,OAAO,EACP,wBAAwB,CAuBzB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateDefineFuncMigration = void 0;
|
|
4
|
+
/* eslint-disable no-console */
|
|
5
|
+
const fs_1 = require("fs");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const utils_1 = require("./utils");
|
|
8
|
+
const ensureEmptyCurrentSql = async (currentMigrationFolderPath) => {
|
|
9
|
+
const dirPath = (0, path_1.join)(process.cwd(), currentMigrationFolderPath);
|
|
10
|
+
const filePath = (0, path_1.join)(dirPath, 'current.sql');
|
|
11
|
+
if ((0, fs_1.existsSync)(filePath)) {
|
|
12
|
+
const currentSql = await fs_1.promises.readFile(filePath, 'utf8');
|
|
13
|
+
const currentSqlWithoutComments = currentSql.replace(/(--.*)|(((\/\*)+?[\w\W]+?(\*\/)+))/gm, '');
|
|
14
|
+
const nonEmptyCurrentSqlLines = currentSqlWithoutComments.match(/^[^\S\r\n]*\S.*$/gm);
|
|
15
|
+
if (nonEmptyCurrentSqlLines !== null &&
|
|
16
|
+
nonEmptyCurrentSqlLines.length > 0) {
|
|
17
|
+
console.error((0, utils_1.getTimestamp)(), (0, utils_1.red)('Please ensure that your current.sql file is empty/only contains comments.'));
|
|
18
|
+
process.exit(-1);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
else if (!(0, fs_1.existsSync)(dirPath)) {
|
|
22
|
+
// File itself is created after contents are generated
|
|
23
|
+
await fs_1.promises.mkdir(dirPath, { recursive: true });
|
|
24
|
+
}
|
|
25
|
+
return filePath;
|
|
26
|
+
};
|
|
27
|
+
const generateContent = async (includeMultitenancyFunctions) => {
|
|
28
|
+
const defineFunctionsPath = (0, path_1.resolve)(__dirname, '../../../migrations/define');
|
|
29
|
+
const defineFunctions = await fs_1.promises.readFile((0, path_1.join)(defineFunctionsPath, 'define-functions.sql'));
|
|
30
|
+
let result = `--! Message: upgrade SQL define functions\n\n${defineFunctions}`;
|
|
31
|
+
if (includeMultitenancyFunctions) {
|
|
32
|
+
const multitenancyDefineFunctions = await fs_1.promises.readFile((0, path_1.join)(defineFunctionsPath, 'define-multitenancy-functions.sql'));
|
|
33
|
+
result = `${result}\n${multitenancyDefineFunctions}`;
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Reads the latest contents of the SQL functions to easily define tables,
|
|
39
|
+
* indexes, etc... We check that migration file is empty/only contains SQL
|
|
40
|
+
* comments before updating it. If it did not exist - will create it.
|
|
41
|
+
*/
|
|
42
|
+
const generate = async ({ includeMultitenancyFunctions, currentMigrationFolderPath, // migrations
|
|
43
|
+
}) => {
|
|
44
|
+
console.log((0, utils_1.getTimestamp)(), (0, utils_1.green)('Starting define functions update migration generation!'));
|
|
45
|
+
const absolutePath = await ensureEmptyCurrentSql(currentMigrationFolderPath);
|
|
46
|
+
const migrationContent = await generateContent(includeMultitenancyFunctions);
|
|
47
|
+
await fs_1.promises.writeFile(absolutePath, migrationContent);
|
|
48
|
+
console.log((0, utils_1.getTimestamp)(), (0, utils_1.green)(`Migration file ${currentMigrationFolderPath} updated!`));
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Yargs command module definition for `generate-define-func-migration` CLI script.
|
|
52
|
+
*/
|
|
53
|
+
exports.generateDefineFuncMigration = {
|
|
54
|
+
command: 'generate-define-func-migration',
|
|
55
|
+
describe: 'Updates a current.sql migrations file with latest ax_define helper function definitions.',
|
|
56
|
+
builder: (yargs) => yargs
|
|
57
|
+
.option('includeMultitenancyFunctions', {
|
|
58
|
+
alias: 'm',
|
|
59
|
+
describe: 'If set to true, would also include multitenancy define functions.',
|
|
60
|
+
default: false,
|
|
61
|
+
boolean: true,
|
|
62
|
+
hidden: true,
|
|
63
|
+
})
|
|
64
|
+
.option('currentMigrationFolderPath', {
|
|
65
|
+
alias: 'p',
|
|
66
|
+
default: 'migrations',
|
|
67
|
+
describe: 'Relative path from working directory to a folder containing current.sql file, which will be updated with latest ax_define function definitions.',
|
|
68
|
+
string: true,
|
|
69
|
+
}),
|
|
70
|
+
handler: generate,
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=generate-define-func-migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-define-func-migration.js","sourceRoot":"","sources":["../../../src/cli/commands/generate-define-func-migration.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,2BAAiD;AACjD,+BAAqC;AAErC,mCAAmD;AAUnD,MAAM,qBAAqB,GAAG,KAAK,EACjC,0BAAkC,EACjB,EAAE;IACnB,MAAM,OAAO,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,0BAA0B,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAC9C,IAAI,IAAA,eAAU,EAAC,QAAQ,CAAC,EAAE;QACxB,MAAM,UAAU,GAAG,MAAM,aAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;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AE,aAAa;EAChB,EAAiB,EAAE;IAC5C,OAAO,CAAC,GAAG,CACT,IAAA,oBAAY,GAAE,EACd,IAAA,aAAK,EAAC,wDAAwD,CAAC,CAChE,CAAC;IAEF,MAAM,YAAY,GAAG,MAAM,qBAAqB,CAAC,0BAA0B,CAAC,CAAC;IAE7E,MAAM,gBAAgB,GAAG,MAAM,eAAe,CAAC,4BAA4B,CAAC,CAAC;IAE7E,MAAM,aAAG,CAAC,SAAS,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;IAEpD,OAAO,CAAC,GAAG,CACT,IAAA,oBAAY,GAAE,EACd,IAAA,aAAK,EAAC,kBAAkB,0BAA0B,WAAW,CAAC,CAC/D,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACU,QAAA,2BAA2B,GAGpC;IACF,OAAO,EAAE,gCAAgC;IACzC,QAAQ,EACN,0FAA0F;IAC5F,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,MAAM,CAAC,8BAA8B,EAAE;QACtC,KAAK,EAAE,GAAG;QACV,QAAQ,EACN,mEAAmE;QACrE,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;KACb,CAAC;SACD,MAAM,CAAC,4BAA4B,EAAE;QACpC,KAAK,EAAE,GAAG;QACV,OAAO,EAAE,YAAY;QACrB,QAAQ,EACN,iJAAiJ;QACnJ,MAAM,EAAE,IAAI;KACb,CAAC;IACN,OAAO,EAAE,QAAQ;CAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-vscode-sql-snippets.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/generate-vscode-sql-snippets.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"generate-vscode-sql-snippets.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/generate-vscode-sql-snippets.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC;;GAEG;AACH,UAAU,uBAAuB;IAC/B,2BAA2B,EAAE,OAAO,CAAC;IACrC,gCAAgC,EAAE,MAAM,CAAC;CAC1C;AA+KD;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,aAAa,CACnD,OAAO,EACP,uBAAuB,CAuBxB,CAAC"}
|
|
@@ -12,25 +12,7 @@ exports.generateVscodeSqlSnippets = void 0;
|
|
|
12
12
|
const fs_1 = require("fs");
|
|
13
13
|
const path_1 = require("path");
|
|
14
14
|
const readdir = require("readdirp");
|
|
15
|
-
|
|
16
|
-
* Colors the CLI text in green.
|
|
17
|
-
*/
|
|
18
|
-
const green = (text) => `\u001b[32m${text}\u001b[39m`;
|
|
19
|
-
/**
|
|
20
|
-
* Colors the CLI text in red.
|
|
21
|
-
*/
|
|
22
|
-
const red = (text) => `\u001b[31m${text}\u001b[39m`;
|
|
23
|
-
/**
|
|
24
|
-
* Returns a readable timestamp in current locale time, e.g. `[2021-05-13 13:02:12.685]`
|
|
25
|
-
*/
|
|
26
|
-
const getTimestamp = () => {
|
|
27
|
-
const offset = new Date().getTimezoneOffset() * 60000; //offset in milliseconds
|
|
28
|
-
const localISOTime = new Date(Date.now() - offset)
|
|
29
|
-
.toISOString()
|
|
30
|
-
.slice(0, -1)
|
|
31
|
-
.replace('T', ' ');
|
|
32
|
-
return `[${localISOTime}]`;
|
|
33
|
-
};
|
|
15
|
+
const utils_1 = require("./utils");
|
|
34
16
|
/**
|
|
35
17
|
* Writes generated snippets object to .vscode folder. Creates a folder if it does not exist.
|
|
36
18
|
* Returns a success message.
|
|
@@ -59,7 +41,7 @@ const parseFunctionName = (line, snippetJson) => {
|
|
|
59
41
|
let prefix = `unnamed-snippet-${unparsedSnippetIndex}`;
|
|
60
42
|
let snippetName = `Unnamed Snippet ${unparsedSnippetIndex}`;
|
|
61
43
|
if (!match) {
|
|
62
|
-
console.log(red(`Unable to parse the name for the following snippet. Naming the snippet ${prefix} instead.`));
|
|
44
|
+
console.log((0, utils_1.red)(`Unable to parse the name for the following snippet. Naming the snippet ${prefix} instead.`));
|
|
63
45
|
console.log(snippetJson);
|
|
64
46
|
unparsedSnippetIndex++;
|
|
65
47
|
}
|
|
@@ -126,7 +108,7 @@ const getParsedSnippets = async (dirPath, includeMultitenancySnippets) => {
|
|
|
126
108
|
if (!includeMultitenancySnippets && path.includes('multitenancy')) {
|
|
127
109
|
continue;
|
|
128
110
|
}
|
|
129
|
-
console.log(getTimestamp(), `Parsing ${path}`);
|
|
111
|
+
console.log((0, utils_1.getTimestamp)(), `Parsing ${path}`);
|
|
130
112
|
await populateSnippets(fullPath, parsedSnippets);
|
|
131
113
|
}
|
|
132
114
|
}
|
|
@@ -154,7 +136,7 @@ const getCustomSnippets = async (dirPath, includeMultitenancySnippets) => {
|
|
|
154
136
|
if (!includeMultitenancySnippets && path.includes('multitenancy')) {
|
|
155
137
|
continue;
|
|
156
138
|
}
|
|
157
|
-
console.log(getTimestamp(), `Reading ${path}`);
|
|
139
|
+
console.log((0, utils_1.getTimestamp)(), `Reading ${path}`);
|
|
158
140
|
const fileContents = JSON.parse((0, fs_1.readFileSync)(fullPath, 'utf-8'));
|
|
159
141
|
customSnippets = Object.assign(Object.assign({}, customSnippets), fileContents);
|
|
160
142
|
}
|
|
@@ -175,12 +157,12 @@ const getCustomSnippets = async (dirPath, includeMultitenancySnippets) => {
|
|
|
175
157
|
* Generates or updates a VScode snippets file.
|
|
176
158
|
*/
|
|
177
159
|
const generate = async ({ includeMultitenancySnippets, snippetsFileNameWithoutExtension, }) => {
|
|
178
|
-
console.log(getTimestamp(), green(`Starting snippets generation!`));
|
|
160
|
+
console.log((0, utils_1.getTimestamp)(), (0, utils_1.green)(`Starting snippets generation!`));
|
|
179
161
|
const dirPath = (0, path_1.resolve)(__dirname, '../../../migrations');
|
|
180
162
|
const parsedSnippets = await getParsedSnippets(dirPath, includeMultitenancySnippets);
|
|
181
163
|
const customSnippets = await getCustomSnippets(dirPath, includeMultitenancySnippets);
|
|
182
164
|
const writeResult = writeSourceFile(snippetsFileNameWithoutExtension, Object.assign(Object.assign({}, parsedSnippets), customSnippets));
|
|
183
|
-
console.log(getTimestamp(), green(writeResult));
|
|
165
|
+
console.log((0, utils_1.getTimestamp)(), (0, utils_1.green)(writeResult));
|
|
184
166
|
};
|
|
185
167
|
/**
|
|
186
168
|
* Yargs command module definition for `generate-vscode-sql-snippets` CLI script.
|
|
@@ -194,6 +176,7 @@ exports.generateVscodeSqlSnippets = {
|
|
|
194
176
|
describe: 'If set to true, would also include snippets for multitenancy define functions.',
|
|
195
177
|
default: false,
|
|
196
178
|
boolean: true,
|
|
179
|
+
hidden: true,
|
|
197
180
|
})
|
|
198
181
|
.option('snippetsFileNameWithoutExtension', {
|
|
199
182
|
alias: 'f',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-vscode-sql-snippets.js","sourceRoot":"","sources":["../../../src/cli/commands/generate-vscode-sql-snippets.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,+BAA+B;AAC/B,2BAAwE;AACxE,+BAAqC;AACrC,oCAAoC;
|
|
1
|
+
{"version":3,"file":"generate-vscode-sql-snippets.js","sourceRoot":"","sources":["../../../src/cli/commands/generate-vscode-sql-snippets.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,+BAA+B;AAC/B,2BAAwE;AACxE,+BAAqC;AACrC,oCAAoC;AAEpC,mCAAmD;AAUnD;;;GAGG;AACH,MAAM,eAAe,GAAG,CACtB,gBAAwB,EACxB,QAAiC,EACzB,EAAE;IACV,MAAM,MAAM,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC;IACzE,IAAI,CAAC,IAAA,eAAU,EAAC,MAAM,CAAC,EAAE;QACvB,IAAA,cAAS,EAAC,MAAM,EAAE,EAAE,SAAS,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I;KACb,CAAC;SACD,MAAM,CAAC,kCAAkC,EAAE;QAC1C,KAAK,EAAE,GAAG;QACV,QAAQ,EACN,qHAAqH;QACvH,OAAO,EAAE,uBAAuB;QAChC,MAAM,EAAE,IAAI;KACb,CAAC;IACN,OAAO,EAAE,QAAQ;CAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC"}
|
|
@@ -10,5 +10,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./generate-define-func-migration"), exports);
|
|
13
14
|
__exportStar(require("./generate-vscode-sql-snippets"), exports);
|
|
14
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA+C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAiD;AACjD,iEAA+C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colors the CLI text in green.
|
|
3
|
+
*/
|
|
4
|
+
export declare const green: (text: string) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Colors the CLI text in red.
|
|
7
|
+
*/
|
|
8
|
+
export declare const red: (text: string) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Returns a readable timestamp in current locale time, e.g. `[2021-05-13 13:02:12.685]`
|
|
11
|
+
*/
|
|
12
|
+
export declare const getTimestamp: () => string;
|
|
13
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,KAAK,SAAU,MAAM,KAAG,MAAuC,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,GAAG,SAAU,MAAM,KAAG,MAAuC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,YAAY,QAAO,MAO/B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTimestamp = exports.red = exports.green = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Colors the CLI text in green.
|
|
6
|
+
*/
|
|
7
|
+
const green = (text) => `\u001b[32m${text}\u001b[39m`;
|
|
8
|
+
exports.green = green;
|
|
9
|
+
/**
|
|
10
|
+
* Colors the CLI text in red.
|
|
11
|
+
*/
|
|
12
|
+
const red = (text) => `\u001b[31m${text}\u001b[39m`;
|
|
13
|
+
exports.red = red;
|
|
14
|
+
/**
|
|
15
|
+
* Returns a readable timestamp in current locale time, e.g. `[2021-05-13 13:02:12.685]`
|
|
16
|
+
*/
|
|
17
|
+
const getTimestamp = () => {
|
|
18
|
+
const offset = new Date().getTimezoneOffset() * 60000; //offset in milliseconds
|
|
19
|
+
const localISOTime = new Date(Date.now() - offset)
|
|
20
|
+
.toISOString()
|
|
21
|
+
.slice(0, -1)
|
|
22
|
+
.replace('T', ' ');
|
|
23
|
+
return `[${localISOTime}]`;
|
|
24
|
+
};
|
|
25
|
+
exports.getTimestamp = getTimestamp;
|
|
26
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/cli/commands/utils.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACI,MAAM,KAAK,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,aAAa,IAAI,YAAY,CAAC;AAAhE,QAAA,KAAK,SAA2D;AAE7E;;GAEG;AACI,MAAM,GAAG,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,aAAa,IAAI,YAAY,CAAC;AAA9D,QAAA,GAAG,OAA2D;AAE3E;;GAEG;AACI,MAAM,YAAY,GAAG,GAAW,EAAE;IACvC,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,iBAAiB,EAAE,GAAG,KAAK,CAAC,CAAC,wBAAwB;IAC/E,MAAM,YAAY,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC;SAC/C,WAAW,EAAE;SACb,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACZ,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACrB,OAAO,IAAI,YAAY,GAAG,CAAC;AAC7B,CAAC,CAAC;AAPW,QAAA,YAAY,gBAOvB"}
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,GAAG,QAAO,IAQtB,CAAC"}
|
package/dist/cli/index.js
CHANGED
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,yCAGoB;AAEb,MAAM,GAAG,GAAG,GAAS,EAAE;IAC5B,KAAK;SACF,UAAU,CAAC,WAAW,CAAC;SACvB,OAAO,CAAC,oCAAyB,CAAC;SAClC,OAAO,CAAC,sCAA2B,CAAC;SACpC,aAAa,EAAE;SACf,IAAI,EAAE;SACN,MAAM,CAAC,wDAAwD,CAAC,CAAC,IAAI,CAAC;AAC3E,CAAC,CAAC;AARW,QAAA,GAAG,OAQd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC"}
|
package/dist/migrations/index.js
CHANGED
|
@@ -10,9 +10,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.createSqlDefineFunctionsMigration = void 0;
|
|
14
13
|
__exportStar(require("./create-migrations-logger"), exports);
|
|
15
|
-
var create_sql_define_functions_migration_1 = require("./create-sql-define-functions-migration");
|
|
16
|
-
Object.defineProperty(exports, "createSqlDefineFunctionsMigration", { enumerable: true, get: function () { return create_sql_define_functions_migration_1.createSqlDefineFunctionsMigration; } });
|
|
17
14
|
__exportStar(require("./utils"), exports);
|
|
18
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAA2C;AAC3C,0CAAwB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-db-common",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0-rc.0",
|
|
4
4
|
"description": "This library encapsulates database-related functionality to develop Mosaic based services.",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "8e33dc6abc7b5a6683822d615303b0b37727a532"
|
|
55
55
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reads the latest contents of the SQL functions to easily define tables, indexes, ...
|
|
3
|
-
* It will create a new current.sql file in that location. If a current.sql file already
|
|
4
|
-
* exists we check that this file is empty/only contains SQL comments before overwriting it.
|
|
5
|
-
*
|
|
6
|
-
* @param migrationFolderPath - the path to the migration folder path where the current.sql file should be created.
|
|
7
|
-
* @param postfixContent - content that should be added to the end. Useful for adding your own define functions.
|
|
8
|
-
*/
|
|
9
|
-
export declare const createSqlDefineFunctionsMigration: (migrationFolderPath: string, postfixContent?: string) => Promise<void>;
|
|
10
|
-
/**
|
|
11
|
-
* This is a Mosaic internal function for multitenancy enabled tables.
|
|
12
|
-
*
|
|
13
|
-
* @param migrationFolderPath - the path to the migration folder path where the current.sql file should be created.
|
|
14
|
-
*/
|
|
15
|
-
export declare const createSqlMultitenancyDefineFunctionsMigration: (migrationFolderPath: string) => Promise<void>;
|
|
16
|
-
//# sourceMappingURL=create-sql-define-functions-migration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-sql-define-functions-migration.d.ts","sourceRoot":"","sources":["../../src/migrations/create-sql-define-functions-migration.ts"],"names":[],"mappings":"AAOA;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC,wBACvB,MAAM,8BAE1B,QAAQ,IAAI,CAiCd,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,6CAA6C,wBACnC,MAAM,KAC1B,QAAQ,IAAI,CASd,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createSqlMultitenancyDefineFunctionsMigration = exports.createSqlDefineFunctionsMigration = void 0;
|
|
4
|
-
const fs_1 = require("fs");
|
|
5
|
-
const path_1 = require("path");
|
|
6
|
-
const getPathToDefinitionsFolder = () => {
|
|
7
|
-
return (0, path_1.resolve)(__dirname, '..', '..', 'migrations', 'define');
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Reads the latest contents of the SQL functions to easily define tables, indexes, ...
|
|
11
|
-
* It will create a new current.sql file in that location. If a current.sql file already
|
|
12
|
-
* exists we check that this file is empty/only contains SQL comments before overwriting it.
|
|
13
|
-
*
|
|
14
|
-
* @param migrationFolderPath - the path to the migration folder path where the current.sql file should be created.
|
|
15
|
-
* @param postfixContent - content that should be added to the end. Useful for adding your own define functions.
|
|
16
|
-
*/
|
|
17
|
-
const createSqlDefineFunctionsMigration = async (migrationFolderPath, postfixContent = '') => {
|
|
18
|
-
const currentSqlFile = (0, path_1.join)(migrationFolderPath, 'current.sql');
|
|
19
|
-
let currentSql = '';
|
|
20
|
-
if ((0, fs_1.existsSync)(currentSqlFile)) {
|
|
21
|
-
currentSql = await fs_1.promises.readFile(currentSqlFile, 'utf8');
|
|
22
|
-
const currentSqlWithoutComments = currentSql.replace(/(--.*)|(((\/\*)+?[\w\W]+?(\*\/)+))/gm, '');
|
|
23
|
-
const nonEmptyCurrentSqlLines = currentSqlWithoutComments.match(/^[^\S\r\n]*\S.*$/gm);
|
|
24
|
-
if (nonEmptyCurrentSqlLines !== null &&
|
|
25
|
-
nonEmptyCurrentSqlLines.length > 0) {
|
|
26
|
-
throw new Error('Please ensure that your current.sql file is empty/only contains comments.');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
const defineFunctions = await fs_1.promises.readFile((0, path_1.join)(getPathToDefinitionsFolder(), 'define-functions.sql'), 'utf8');
|
|
30
|
-
const migrationContent = `--! Message: upgrade SQL define functions
|
|
31
|
-
|
|
32
|
-
${defineFunctions}
|
|
33
|
-
|
|
34
|
-
${postfixContent}
|
|
35
|
-
`;
|
|
36
|
-
await fs_1.promises.writeFile(currentSqlFile, migrationContent);
|
|
37
|
-
};
|
|
38
|
-
exports.createSqlDefineFunctionsMigration = createSqlDefineFunctionsMigration;
|
|
39
|
-
/**
|
|
40
|
-
* This is a Mosaic internal function for multitenancy enabled tables.
|
|
41
|
-
*
|
|
42
|
-
* @param migrationFolderPath - the path to the migration folder path where the current.sql file should be created.
|
|
43
|
-
*/
|
|
44
|
-
const createSqlMultitenancyDefineFunctionsMigration = async (migrationFolderPath) => {
|
|
45
|
-
const multitenancyDefineFunctions = await fs_1.promises.readFile((0, path_1.join)(getPathToDefinitionsFolder(), 'define-multitenancy-functions.sql'), 'utf8');
|
|
46
|
-
await (0, exports.createSqlDefineFunctionsMigration)(migrationFolderPath, multitenancyDefineFunctions);
|
|
47
|
-
};
|
|
48
|
-
exports.createSqlMultitenancyDefineFunctionsMigration = createSqlMultitenancyDefineFunctionsMigration;
|
|
49
|
-
//# sourceMappingURL=create-sql-define-functions-migration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-sql-define-functions-migration.js","sourceRoot":"","sources":["../../src/migrations/create-sql-define-functions-migration.ts"],"names":[],"mappings":";;;AAAA,2BAAiD;AACjD,+BAAqC;AAErC,MAAM,0BAA0B,GAAG,GAAW,EAAE;IAC9C,OAAO,IAAA,cAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAA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