@aeriajs/cli 0.0.159 → 0.0.161
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/ci.d.ts +1 -0
- package/dist/ci.js +7 -0
- package/dist/migrate.js +7 -6
- package/dist/mirrorSdk.js +1 -1
- package/package.json +1 -1
package/dist/ci.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isRunningOnCI: () => string | undefined;
|
package/dist/ci.js
ADDED
package/dist/migrate.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getCollections } from '@aeriajs/entrypoint';
|
|
2
2
|
import { getDatabase, getDatabaseCollection, getReferences } from '@aeriajs/core';
|
|
3
3
|
import { Result } from '@aeriajs/types';
|
|
4
|
+
import { isRunningOnCI } from './ci.js';
|
|
4
5
|
import { log } from './log.js';
|
|
5
6
|
const recurseReferences = (refMap, indexMap) => {
|
|
6
7
|
for (const reference of Object.values(refMap)) {
|
|
@@ -19,15 +20,15 @@ const recurseReferences = (refMap, indexMap) => {
|
|
|
19
20
|
return indexMap;
|
|
20
21
|
};
|
|
21
22
|
export const migrate = async () => {
|
|
22
|
-
if (
|
|
23
|
-
|| process.env.TRAVIS
|
|
24
|
-
|| process.env.CIRCLECI
|
|
25
|
-
|| process.env.GITLAB_CI
|
|
26
|
-
|| process.env.IS_CI) {
|
|
23
|
+
if (isRunningOnCI()) {
|
|
27
24
|
return Result.result('skipping (continuos integration detected)');
|
|
28
25
|
}
|
|
29
26
|
if (process.env.NODE_ENV !== 'production') {
|
|
30
|
-
|
|
27
|
+
try {
|
|
28
|
+
process.loadEnvFile();
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
}
|
|
31
32
|
}
|
|
32
33
|
const collections = await getCollections();
|
|
33
34
|
const session = await getDatabase();
|
package/dist/mirrorSdk.js
CHANGED
|
@@ -2,7 +2,7 @@ import { builtinFunctions } from '@aeriajs/builtins';
|
|
|
2
2
|
import { Result } from '@aeriajs/types';
|
|
3
3
|
export const mirrorSdk = async (defaultConfig) => {
|
|
4
4
|
try {
|
|
5
|
-
const { getConfig } = await import('aeria-sdk/
|
|
5
|
+
const { getConfig } = await import('aeria-sdk/config');
|
|
6
6
|
const { writeMirrorFiles } = await import('aeria-sdk/mirror');
|
|
7
7
|
const response = await builtinFunctions.describe({
|
|
8
8
|
router: true,
|