@contember/cli-common
Advanced tools
Comparing version 0.12.0-beta.0 to 0.12.0-beta.1
@@ -32,4 +32,4 @@ import { ProjectManager } from './ProjectManager'; | ||
} | ||
export declare const formatWorkspaceConfigPath: (workspaceDirectory: string) => string; | ||
export declare const formatWorkspaceConfigPath: (workspaceDirectory: string) => string[]; | ||
export {}; | ||
//# sourceMappingURL=Workspace.d.ts.map |
@@ -43,11 +43,16 @@ "use strict"; | ||
exports.Workspace = Workspace; | ||
const formatWorkspaceConfigPath = (workspaceDirectory) => path_1.join(workspaceDirectory, 'contember.workspace.yaml'); | ||
const formatWorkspaceConfigPath = (workspaceDirectory) => [ | ||
path_1.join(workspaceDirectory, 'contember.yaml'), | ||
path_1.join(workspaceDirectory, 'contember.workspace.yaml'), | ||
]; | ||
exports.formatWorkspaceConfigPath = formatWorkspaceConfigPath; | ||
const readWorkspaceConfig = async ({ workspaceDirectory }) => { | ||
const configPath = exports.formatWorkspaceConfigPath(workspaceDirectory); | ||
if (!(await fs_extra_1.pathExists(configPath))) { | ||
return {}; | ||
for (const file of configPath) { | ||
if ((await fs_extra_1.pathExists(file))) { | ||
return await yaml_1.readYaml(file); | ||
} | ||
} | ||
return await yaml_1.readYaml(configPath); | ||
return {}; | ||
}; | ||
//# sourceMappingURL=Workspace.js.map |
{ | ||
"name": "@contember/cli-common", | ||
"version": "0.12.0-beta.0", | ||
"version": "0.12.0-beta.1", | ||
"license": "Apache-2.0", | ||
@@ -16,3 +16,3 @@ "main": "dist/src/index.js", | ||
"dependencies": { | ||
"@contember/config-loader": "^0.12.0-beta.0", | ||
"@contember/config-loader": "^0.12.0-beta.1", | ||
"chalk": "^4.1.0", | ||
@@ -19,0 +19,0 @@ "download-tarball": "^2.0.0", |
/// <reference types="vite/client" /> | ||
interface ImportMetaEnv { | ||
VITE_CONTEMBER_ADMIN_API_BASE_URL: string | ||
VITE_CONTEMBER_ADMIN_SESSION_TOKEN: string | ||
VITE_CONTEMBER_ADMIN_PROJECT_NAME: string | ||
} |
{ | ||
"scripts-template": { | ||
"contember": "docker-compose run contember-cli", | ||
"start-admin": "vite admin --port ${VITE_PORT:-4000}", | ||
"build-admin": "tsc && vite admin build" | ||
"start-admin": "vite admin --port ${VITE_PORT:-4000} --host 0.0.0.0", | ||
"build-admin": "tsc && vite build admin" | ||
}, | ||
@@ -13,3 +13,2 @@ "devDependencies": { | ||
"@types/react": "17.0.5", | ||
"@vitejs/plugin-react-refresh": "1.3.6", | ||
"react": "17.0.1", | ||
@@ -16,0 +15,0 @@ "react-dom": "17.0.1", |
@@ -6,7 +6,4 @@ { | ||
"isolatedModules": true, | ||
"jsx": "react-jsx", | ||
"lib": [ | ||
"esnext", | ||
"dom" | ||
], | ||
"jsx": "react", | ||
"lib": ["esnext", "dom"], | ||
"module": "esnext", | ||
@@ -13,0 +10,0 @@ "moduleResolution": "node", |
@@ -64,10 +64,15 @@ import { basename, join } from 'path' | ||
export const formatWorkspaceConfigPath = (workspaceDirectory: string) => join(workspaceDirectory, 'contember.workspace.yaml') | ||
export const formatWorkspaceConfigPath = (workspaceDirectory: string) => [ | ||
join(workspaceDirectory, 'contember.yaml'), | ||
join(workspaceDirectory, 'contember.workspace.yaml'), | ||
] | ||
const readWorkspaceConfig = async ({ workspaceDirectory }: WorkspaceDirectoryArgument): Promise<WorkspaceConfig> => { | ||
const configPath = formatWorkspaceConfigPath(workspaceDirectory) | ||
if (!(await pathExists(configPath))) { | ||
return {} | ||
for (const file of configPath) { | ||
if ((await pathExists(file))) { | ||
return await readYaml(file) | ||
} | ||
} | ||
return await readYaml(configPath) | ||
return {} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
144178
2113
155