@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 ADDED
@@ -0,0 +1 @@
1
+ export declare const isRunningOnCI: () => string | undefined;
package/dist/ci.js ADDED
@@ -0,0 +1,7 @@
1
+ export const isRunningOnCI = () => {
2
+ return process.env.GITHUB_ACTIONS
3
+ || process.env.TRAVIS
4
+ || process.env.CIRCLECI
5
+ || process.env.GITLAB_CI
6
+ || process.env.IS_CI;
7
+ };
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 (process.env.GITHUB_ACTIONS
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
- process.loadEnvFile();
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/utils');
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,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aeriajs/cli",
3
3
  "type": "module",
4
- "version": "0.0.159",
4
+ "version": "0.0.161",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",