Merge pull request #578 from umbraco/manual-json-schema
JSON Schema for Extensions
This commit is contained in:
@@ -6,8 +6,24 @@ export interface ManifestCollectionView extends ManifestElement, ManifestWithCon
|
||||
}
|
||||
|
||||
export interface MetaCollectionView {
|
||||
/**
|
||||
* The friendly name of the collection view
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* An icon to represent the collection view
|
||||
*
|
||||
* @examples [
|
||||
* "umb:box",
|
||||
* "umb:grid"
|
||||
* ]
|
||||
*/
|
||||
icon: string;
|
||||
|
||||
/**
|
||||
* The URL pathname for this collection view that can be deep linked to by sharing the url
|
||||
*/
|
||||
pathName: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,34 @@ export interface ManifestDashboard extends ManifestElement, ManifestWithConditio
|
||||
}
|
||||
|
||||
export interface MetaDashboard {
|
||||
/**
|
||||
* This is the URL path for the dashboard which is used for navigating or deep linking directly to the dashboard
|
||||
* https://yoursite.com/section/settings/dashboard/my-dashboard-path
|
||||
*
|
||||
* @example my-dashboard-path
|
||||
* @examples [
|
||||
* "my-dashboard-path"
|
||||
* ]
|
||||
*/
|
||||
pathname: string;
|
||||
|
||||
/**
|
||||
* The displayed name (label) for the tab of the dashboard
|
||||
*/
|
||||
label?: string;
|
||||
}
|
||||
|
||||
export interface ConditionsDashboard {
|
||||
/**
|
||||
* An array of section aliases that the dashboard should be available in
|
||||
*
|
||||
* @uniqueItems true
|
||||
* @minItems 1
|
||||
* @items.examples [
|
||||
* "Umb.Section.Content",
|
||||
* "Umb.Section.Settings"
|
||||
* ]
|
||||
*
|
||||
*/
|
||||
sections: string[];
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
/**
|
||||
* An action to perform on an entity
|
||||
* For example for content you may wish to create a new document etc
|
||||
*/
|
||||
export interface ManifestEntityAction extends ManifestElement {
|
||||
type: 'entityAction';
|
||||
meta: MetaEntityAction;
|
||||
@@ -7,9 +11,38 @@ export interface ManifestEntityAction extends ManifestElement {
|
||||
}
|
||||
|
||||
export interface MetaEntityAction {
|
||||
/**
|
||||
* An icon to represent the action to be performed
|
||||
*
|
||||
* @examples [
|
||||
* "umb:box",
|
||||
* "umb:grid"
|
||||
* ]
|
||||
*/
|
||||
icon?: string;
|
||||
|
||||
/**
|
||||
* The friendly name of the action to perform
|
||||
*
|
||||
* @examples [
|
||||
* "Create",
|
||||
* "Create Content Template"
|
||||
* ]
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* @TJS-ignore
|
||||
*/
|
||||
api: any; // create interface
|
||||
|
||||
/**
|
||||
* The alias for the repsoitory of the entity type this action is for
|
||||
* such as 'Umb.Repository.Documents'
|
||||
* @examples [
|
||||
* "Umb.Repository.Documents"
|
||||
* ]
|
||||
*/
|
||||
repositoryAlias: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,33 @@
|
||||
import type { ManifestElement, ManifestWithConditions } from './models';
|
||||
|
||||
/**
|
||||
* An action to perform on multiple entities
|
||||
* For example for content you may wish to move one or more documents in bulk
|
||||
*/
|
||||
export interface ManifestEntityBulkAction extends ManifestElement, ManifestWithConditions<ConditionsEntityBulkAction> {
|
||||
type: 'entityBulkAction';
|
||||
meta: MetaEntityBulkAction;
|
||||
}
|
||||
|
||||
export interface MetaEntityBulkAction {
|
||||
/**
|
||||
* A friendly label for the action
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* @TJS-ignore
|
||||
*/
|
||||
api: any; // create interface
|
||||
|
||||
/**
|
||||
* The alias for the repsoitory of the entity type this action is for
|
||||
* such as 'Umb.Repository.Documents'
|
||||
*
|
||||
* @examples [
|
||||
* "Umb.Repository.Documents"
|
||||
* ]
|
||||
*/
|
||||
repositoryAlias: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
/**
|
||||
* Header apps are displayed in the top right corner of the backoffice
|
||||
* The two provided header apps are the search and the user menu
|
||||
*/
|
||||
export interface ManifestHeaderApp extends ManifestElement {
|
||||
type: 'headerApp';
|
||||
//meta: MetaHeaderApp;
|
||||
}
|
||||
|
||||
// TODO: Warren these don't seem to be used anywhere
|
||||
export interface MetaHeaderApp {
|
||||
pathname: string;
|
||||
label: string;
|
||||
|
||||
@@ -102,10 +102,31 @@ export type SpecificManifestTypeOrManifestBase<T extends keyof ManifestTypeMap |
|
||||
T extends keyof ManifestTypeMap ? ManifestTypeMap[T] : ManifestBase;
|
||||
|
||||
export interface ManifestBase {
|
||||
/**
|
||||
* The type of extension such as dashboard etc...
|
||||
*/
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* The alias of the extension, ensure it is unique
|
||||
*/
|
||||
alias: string;
|
||||
kind?: any; // I had to add the optional kind property set to undefined. To make the ManifestTypes recognize the Manifest Kind types. Notice that Kinds has to Omit the kind property when extending.
|
||||
|
||||
/**
|
||||
* The kind of the extension, used to group extensions together
|
||||
*
|
||||
* @examples ["button"]
|
||||
*/
|
||||
kind?: unknown; // I had to add the optional kind property set to undefined. To make the ManifestTypes recognize the Manifest Kind types. Notice that Kinds has to Omit the kind property when extending.
|
||||
|
||||
/**
|
||||
* The friendly name of the extension
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* Extensions such as dashboards are ordered by weight with lower numbers being first in the list
|
||||
*/
|
||||
weight?: number;
|
||||
}
|
||||
|
||||
@@ -118,17 +139,39 @@ export interface ManifestKind {
|
||||
}
|
||||
|
||||
export interface ManifestWithConditions<ConditionsType> {
|
||||
/**
|
||||
* Set the conditions for when the extension should be loaded
|
||||
*/
|
||||
conditions: ConditionsType;
|
||||
}
|
||||
|
||||
export interface ManifestWithLoader<LoaderReturnType> extends ManifestBase {
|
||||
/**
|
||||
* @TJS-ignore
|
||||
*/
|
||||
loader?: () => Promise<LoaderReturnType>;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of extension such as dashboard etc...
|
||||
*/
|
||||
export interface ManifestClass<T = unknown> extends ManifestWithLoader<object> {
|
||||
//type: ManifestStandardTypes;
|
||||
|
||||
/**
|
||||
* The file location of the javascript file to load
|
||||
* @TJS-required
|
||||
*/
|
||||
js?: string;
|
||||
|
||||
/**
|
||||
* @TJS-ignore
|
||||
*/
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* @TJS-ignore
|
||||
*/
|
||||
class?: ClassConstructor<T>;
|
||||
//loader?: () => Promise<object | HTMLElement>;
|
||||
}
|
||||
@@ -139,10 +182,26 @@ export interface ManifestClassWithClassConstructor extends ManifestClass {
|
||||
|
||||
export interface ManifestElement extends ManifestWithLoader<object | HTMLElement> {
|
||||
//type: ManifestStandardTypes;
|
||||
|
||||
/**
|
||||
* The file location of the javascript file to load
|
||||
*
|
||||
* @TJS-require
|
||||
*/
|
||||
js?: string;
|
||||
|
||||
/**
|
||||
* The HTML web component name to use such as 'my-dashboard'
|
||||
* Note it is NOT <my-dashboard></my-dashboard> but just the name
|
||||
*/
|
||||
elementName?: string;
|
||||
|
||||
//loader?: () => Promise<object | HTMLElement>;
|
||||
meta?: any;
|
||||
|
||||
/**
|
||||
* This contains properties specific to the type of extension
|
||||
*/
|
||||
meta?: unknown;
|
||||
}
|
||||
|
||||
export interface ManifestWithView extends ManifestElement {
|
||||
@@ -156,22 +215,29 @@ export interface MetaManifestWithView {
|
||||
}
|
||||
|
||||
export interface ManifestElementWithElementName extends ManifestElement {
|
||||
/**
|
||||
* The HTML web component name to use such as 'my-dashboard'
|
||||
* Note it is NOT <my-dashboard></my-dashboard> but just the name
|
||||
*/
|
||||
elementName: string;
|
||||
}
|
||||
|
||||
// TODO: Remove Custom as it has no purpose currently:
|
||||
/*
|
||||
export interface ManifestCustom extends ManifestBase {
|
||||
type: 'custom';
|
||||
meta?: unknown;
|
||||
}
|
||||
*/
|
||||
|
||||
export interface ManifestWithMeta extends ManifestBase {
|
||||
/**
|
||||
* This contains properties specific to the type of extension
|
||||
*/
|
||||
meta: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* This type of extension gives full control and will simply load the specified JS file
|
||||
* You could have custom logic to decide which extensions to load/register by using extensionRegistry
|
||||
*/
|
||||
export interface ManifestEntrypoint extends ManifestBase {
|
||||
type: 'entrypoint';
|
||||
|
||||
/**
|
||||
* The file location of the javascript file to load in the backoffice
|
||||
*/
|
||||
js: string;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
import type { ManifestWithLoader } from './models';
|
||||
|
||||
// TODO: make or find type for JS Module with default export: Would be nice to support css file directly.
|
||||
|
||||
/**
|
||||
* Theme manifest for styling the backoffice of Umbraco such as dark, high contrast etc
|
||||
*/
|
||||
export interface ManifestTheme extends ManifestWithLoader<string> {
|
||||
type: 'theme';
|
||||
|
||||
/**
|
||||
* File location of the CSS file of the theme
|
||||
*
|
||||
* @examples ["themes/dark.theme.css"]
|
||||
*/
|
||||
css?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { ManifestTypes } from './models';
|
||||
|
||||
/**
|
||||
* Umbraco package manifest JSON
|
||||
*/
|
||||
export class UmbracoPackage {
|
||||
/**
|
||||
* @title The name of the Umbraco package
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* @title The version of the Umbraco package in the style of semver
|
||||
* @examples ["0.1.0"]
|
||||
*/
|
||||
version?: string;
|
||||
|
||||
/**
|
||||
* @title Decides if the package sends telemetry data for collection
|
||||
* @default true
|
||||
*/
|
||||
allowTelemetry?: boolean;
|
||||
|
||||
/**
|
||||
* @title An array of Umbraco package manifest types that will be installed
|
||||
*/
|
||||
extensions?: ManifestTypes[];
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import type { InterfaceColor, InterfaceLook } from '@umbraco-ui/uui-base/lib/types/index';
|
||||
import type { ManifestElement } from './models';
|
||||
import { UmbWorkspaceAction } from '@umbraco-cms/backoffice/workspace';
|
||||
import type { ClassConstructor } from '@umbraco-cms/backoffice/models';
|
||||
|
||||
export interface ManifestWorkspaceAction extends ManifestElement {
|
||||
@@ -13,7 +12,7 @@ export interface MetaWorkspaceAction {
|
||||
label?: string; //TODO: Use or implement additional label-key
|
||||
look?: InterfaceLook;
|
||||
color?: InterfaceColor;
|
||||
api: ClassConstructor<UmbWorkspaceAction>;
|
||||
api: ClassConstructor<any>;
|
||||
}
|
||||
|
||||
export interface ConditionsWorkspaceAction {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type * from 'router-slot/model';
|
||||
export * from 'router-slot/model';
|
||||
export * from 'router-slot/util';
|
||||
export * from './route-location.interface';
|
||||
export * from './route.context';
|
||||
|
||||
380
src/Umbraco.Web.UI.Client/package-lock.json
generated
380
src/Umbraco.Web.UI.Client/package-lock.json
generated
@@ -69,6 +69,7 @@
|
||||
"storybook": "^7.0.2",
|
||||
"tiny-glob": "^0.2.9",
|
||||
"typescript": "^5.0.3",
|
||||
"typescript-json-schema": "^0.55.0",
|
||||
"vite": "^4.2.1",
|
||||
"vite-plugin-static-copy": "^0.13.0",
|
||||
"vite-tsconfig-paths": "^4.0.5",
|
||||
@@ -2000,6 +2001,28 @@
|
||||
"node": ">=0.1.90"
|
||||
}
|
||||
},
|
||||
"node_modules/@cspotcode/source-map-support": {
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
|
||||
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/trace-mapping": "0.3.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
|
||||
"version": "0.3.9",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
|
||||
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/resolve-uri": "^3.0.3",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.10"
|
||||
}
|
||||
},
|
||||
"node_modules/@discoveryjs/json-ext": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
|
||||
@@ -4733,6 +4756,30 @@
|
||||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@tsconfig/node10": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
|
||||
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@tsconfig/node12": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
|
||||
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@tsconfig/node14": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
|
||||
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@tsconfig/node16": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
|
||||
"integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/accepts": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz",
|
||||
@@ -7049,6 +7096,15 @@
|
||||
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn-walk": {
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
|
||||
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/address": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz",
|
||||
@@ -7260,6 +7316,12 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/arg": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
||||
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/argparse": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
@@ -8592,6 +8654,12 @@
|
||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/create-require": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
||||
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/cross-fetch": {
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
|
||||
@@ -13530,6 +13598,12 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/make-error": {
|
||||
"version": "1.3.6",
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/make-iterator": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
|
||||
@@ -14666,6 +14740,12 @@
|
||||
"tslib": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/path-equal": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/path-equal/-/path-equal-1.2.5.tgz",
|
||||
"integrity": "sha512-i73IctDr3F2W+bsOWDyyVm/lqsXO47aY9nsFZUjTT/aljSbkxHxxCoyZ9UUrM8jK0JVod+An+rl48RCsvWM+9g==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/path-exists": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||
@@ -16179,6 +16259,15 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-stable-stringify": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.2.tgz",
|
||||
"integrity": "sha512-gMxvPJYhP0O9n2pvcfYfIuYgbledAOJFcqRThtPRmjscaipiwcwPPKLytpVzMkG2HAN87Qmo2d4PtGiri1dSLA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
@@ -17234,6 +17323,58 @@
|
||||
"node": ">=6.10"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-node": {
|
||||
"version": "10.9.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
|
||||
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@cspotcode/source-map-support": "^0.8.0",
|
||||
"@tsconfig/node10": "^1.0.7",
|
||||
"@tsconfig/node12": "^1.0.7",
|
||||
"@tsconfig/node14": "^1.0.0",
|
||||
"@tsconfig/node16": "^1.0.2",
|
||||
"acorn": "^8.4.1",
|
||||
"acorn-walk": "^8.1.1",
|
||||
"arg": "^4.1.0",
|
||||
"create-require": "^1.1.0",
|
||||
"diff": "^4.0.1",
|
||||
"make-error": "^1.1.1",
|
||||
"v8-compile-cache-lib": "^3.0.1",
|
||||
"yn": "3.1.1"
|
||||
},
|
||||
"bin": {
|
||||
"ts-node": "dist/bin.js",
|
||||
"ts-node-cwd": "dist/bin-cwd.js",
|
||||
"ts-node-esm": "dist/bin-esm.js",
|
||||
"ts-node-script": "dist/bin-script.js",
|
||||
"ts-node-transpile-only": "dist/bin-transpile.js",
|
||||
"ts-script": "dist/bin-script-deprecated.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@swc/core": ">=1.2.50",
|
||||
"@swc/wasm": ">=1.2.50",
|
||||
"@types/node": "*",
|
||||
"typescript": ">=2.7"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@swc/core": {
|
||||
"optional": true
|
||||
},
|
||||
"@swc/wasm": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/ts-node/node_modules/diff": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-simple-type": {
|
||||
"version": "2.0.0-next.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-simple-type/-/ts-simple-type-2.0.0-next.0.tgz",
|
||||
@@ -17389,6 +17530,64 @@
|
||||
"node": ">=12.20"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript-json-schema": {
|
||||
"version": "0.55.0",
|
||||
"resolved": "https://registry.npmjs.org/typescript-json-schema/-/typescript-json-schema-0.55.0.tgz",
|
||||
"integrity": "sha512-BXaivYecUdiXWWNiUqXgY6A9cMWerwmhtO+lQE7tDZGs7Mf38sORDeQZugfYOZOHPZ9ulsD+w0LWjFDOQoXcwg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@types/node": "^16.9.2",
|
||||
"glob": "^7.1.7",
|
||||
"path-equal": "^1.1.2",
|
||||
"safe-stable-stringify": "^2.2.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "~4.8.2",
|
||||
"yargs": "^17.1.1"
|
||||
},
|
||||
"bin": {
|
||||
"typescript-json-schema": "bin/typescript-json-schema"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript-json-schema/node_modules/@types/node": {
|
||||
"version": "16.18.16",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.16.tgz",
|
||||
"integrity": "sha512-ZOzvDRWp8dCVBmgnkIqYCArgdFOO9YzocZp8Ra25N/RStKiWvMOXHMz+GjSeVNe5TstaTmTWPucGJkDw0XXJWA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/typescript-json-schema/node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript-json-schema/node_modules/typescript": {
|
||||
"version": "4.8.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz",
|
||||
"integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/typical": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz",
|
||||
@@ -17708,6 +17907,12 @@
|
||||
"integrity": "sha512-dsNgbLaTrd6l3MMxTtouOCFw4CBFc/3a+GgYA2YyrJvyQ1u6q4pcu3ktLoUZ/VN/Aw9WsauazbgsgdfVWgAKQg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/v8-compile-cache-lib": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
|
||||
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/v8-to-istanbul": {
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz",
|
||||
@@ -18351,6 +18556,15 @@
|
||||
"node": ">= 4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||
@@ -19712,6 +19926,27 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"@cspotcode/source-map-support": {
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
|
||||
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@jridgewell/trace-mapping": "0.3.9"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jridgewell/trace-mapping": {
|
||||
"version": "0.3.9",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
|
||||
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@jridgewell/resolve-uri": "^3.0.3",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@discoveryjs/json-ext": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
|
||||
@@ -21594,6 +21829,30 @@
|
||||
"magic-string": "^0.27.0"
|
||||
}
|
||||
},
|
||||
"@tsconfig/node10": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
|
||||
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
|
||||
"dev": true
|
||||
},
|
||||
"@tsconfig/node12": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
|
||||
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
|
||||
"dev": true
|
||||
},
|
||||
"@tsconfig/node14": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
|
||||
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
|
||||
"dev": true
|
||||
},
|
||||
"@tsconfig/node16": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
|
||||
"integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/accepts": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz",
|
||||
@@ -23639,6 +23898,12 @@
|
||||
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
|
||||
"dev": true
|
||||
},
|
||||
"acorn-walk": {
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
|
||||
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
|
||||
"dev": true
|
||||
},
|
||||
"address": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz",
|
||||
@@ -23804,6 +24069,12 @@
|
||||
"readable-stream": "^3.6.0"
|
||||
}
|
||||
},
|
||||
"arg": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
||||
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
||||
"dev": true
|
||||
},
|
||||
"argparse": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
@@ -24802,6 +25073,12 @@
|
||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
|
||||
"dev": true
|
||||
},
|
||||
"create-require": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
||||
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
||||
"dev": true
|
||||
},
|
||||
"cross-fetch": {
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
|
||||
@@ -28474,6 +28751,12 @@
|
||||
"semver": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"make-error": {
|
||||
"version": "1.3.6",
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||
"dev": true
|
||||
},
|
||||
"make-iterator": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
|
||||
@@ -29334,6 +29617,12 @@
|
||||
"tslib": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"path-equal": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/path-equal/-/path-equal-1.2.5.tgz",
|
||||
"integrity": "sha512-i73IctDr3F2W+bsOWDyyVm/lqsXO47aY9nsFZUjTT/aljSbkxHxxCoyZ9UUrM8jK0JVod+An+rl48RCsvWM+9g==",
|
||||
"dev": true
|
||||
},
|
||||
"path-exists": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||
@@ -30419,6 +30708,12 @@
|
||||
"is-regex": "^1.1.4"
|
||||
}
|
||||
},
|
||||
"safe-stable-stringify": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.2.tgz",
|
||||
"integrity": "sha512-gMxvPJYhP0O9n2pvcfYfIuYgbledAOJFcqRThtPRmjscaipiwcwPPKLytpVzMkG2HAN87Qmo2d4PtGiri1dSLA==",
|
||||
"dev": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
@@ -31276,6 +31571,35 @@
|
||||
"integrity": "sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==",
|
||||
"dev": true
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "10.9.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
|
||||
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@cspotcode/source-map-support": "^0.8.0",
|
||||
"@tsconfig/node10": "^1.0.7",
|
||||
"@tsconfig/node12": "^1.0.7",
|
||||
"@tsconfig/node14": "^1.0.0",
|
||||
"@tsconfig/node16": "^1.0.2",
|
||||
"acorn": "^8.4.1",
|
||||
"acorn-walk": "^8.1.1",
|
||||
"arg": "^4.1.0",
|
||||
"create-require": "^1.1.0",
|
||||
"diff": "^4.0.1",
|
||||
"make-error": "^1.1.1",
|
||||
"v8-compile-cache-lib": "^3.0.1",
|
||||
"yn": "3.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"diff": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"ts-simple-type": {
|
||||
"version": "2.0.0-next.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-simple-type/-/ts-simple-type-2.0.0-next.0.tgz",
|
||||
@@ -31387,6 +31711,50 @@
|
||||
"integrity": "sha512-xv8mOEDnigb/tN9PSMTwSEqAnUvkoXMQlicOb0IUVDBSQCgBSaAAROUZYy2IcUy5qU6XajK5jjjO7TMWqBTKZA==",
|
||||
"dev": true
|
||||
},
|
||||
"typescript-json-schema": {
|
||||
"version": "0.55.0",
|
||||
"resolved": "https://registry.npmjs.org/typescript-json-schema/-/typescript-json-schema-0.55.0.tgz",
|
||||
"integrity": "sha512-BXaivYecUdiXWWNiUqXgY6A9cMWerwmhtO+lQE7tDZGs7Mf38sORDeQZugfYOZOHPZ9ulsD+w0LWjFDOQoXcwg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@types/node": "^16.9.2",
|
||||
"glob": "^7.1.7",
|
||||
"path-equal": "^1.1.2",
|
||||
"safe-stable-stringify": "^2.2.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "~4.8.2",
|
||||
"yargs": "^17.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "16.18.16",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.16.tgz",
|
||||
"integrity": "sha512-ZOzvDRWp8dCVBmgnkIqYCArgdFOO9YzocZp8Ra25N/RStKiWvMOXHMz+GjSeVNe5TstaTmTWPucGJkDw0XXJWA==",
|
||||
"dev": true
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.8.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz",
|
||||
"integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"typical": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz",
|
||||
@@ -31616,6 +31984,12 @@
|
||||
"integrity": "sha512-dsNgbLaTrd6l3MMxTtouOCFw4CBFc/3a+GgYA2YyrJvyQ1u6q4pcu3ktLoUZ/VN/Aw9WsauazbgsgdfVWgAKQg==",
|
||||
"dev": true
|
||||
},
|
||||
"v8-compile-cache-lib": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
|
||||
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
|
||||
"dev": true
|
||||
},
|
||||
"v8-to-istanbul": {
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz",
|
||||
@@ -32081,6 +32455,12 @@
|
||||
"integrity": "sha512-RXRJzMiK6U2ye0BlGGZnmpwJDPgakn6aNQ0A7gHRbD4I0uvK4TW6UqkK1V0pp9jskjJBAXd3dRrbzWkqJ+6cxA==",
|
||||
"dev": true
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"dev": true
|
||||
},
|
||||
"yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||
|
||||
@@ -28,10 +28,11 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build --mode staging",
|
||||
"build:libs": "npm run wc-analyze && npm run wc-analyze:vscode && rollup -c rollup-libs.config.js && node utils/move-libs.js",
|
||||
"build:libs": "npm run wc-analyze && npm run wc-analyze:vscode && rollup -c rollup-libs.config.js",
|
||||
"build:for:static": "tsc && vite build",
|
||||
"build:for:cms": "tsc && npm run build:libs && vite build -c vite.cms.config.ts",
|
||||
"build:for:cms:watch": "tsc && npm run build:libs && vite build -c vite.cms.config.ts --watch",
|
||||
"build:cms:prereq": "tsc && npm run build:libs && npm run generate:jsonschema && node utils/move-libs.js",
|
||||
"build:for:cms": "npm run build:cms:prereq && vite build -c vite.cms.config.ts",
|
||||
"build:for:cms:watch": "npm run build:cms:prereq && vite build -c vite.cms.config.ts --watch",
|
||||
"preview": "vite preview --open",
|
||||
"test": "web-test-runner --coverage",
|
||||
"test:watch": "web-test-runner --watch",
|
||||
@@ -45,12 +46,13 @@
|
||||
"format:fix": "npm run format -- --write",
|
||||
"generate:api": "openapi --input https://raw.githubusercontent.com/umbraco/Umbraco-CMS/v13/dev/src/Umbraco.Cms.Api.Management/OpenApi.json --output libs/backend-api/src --postfix Resource --useOptions",
|
||||
"generate:api-dev": "openapi --input http://localhost:11000/umbraco/swagger/v1/swagger.json --output libs/backend-api/src --postfix Resource --useOptions",
|
||||
"generate:jsonschema": "typescript-json-schema --required --include \"./libs/extensions-registry/*.ts\" --out dist/libs/umbraco-package-schema.json tsconfig.json UmbracoPackage",
|
||||
"storybook": "npm run wc-analyze && storybook dev -p 6006",
|
||||
"storybook:build": "npm run wc-analyze && storybook build",
|
||||
"build-storybook": "npm run wc-analyze && storybook build",
|
||||
"generate:icons": "node ./devops/icons/index.js",
|
||||
"wc-analyze": "wca **/*.element.ts --outFile custom-elements.json",
|
||||
"wc-analyze:vscode": "wca **/*.element.ts --format vscode --outFile vscode-html-custom-data.json",
|
||||
"wc-analyze": "wca **/*.element.ts --outFile dist/libs/custom-elements.json",
|
||||
"wc-analyze:vscode": "wca **/*.element.ts --format vscode --outFile dist/libs/vscode-html-custom-data.json",
|
||||
"new-extension": "plop --plopfile ./devops/plop/plop.js",
|
||||
"compile": "tsc",
|
||||
"check": "npm run lint && npm run compile && npm run build-storybook"
|
||||
@@ -120,6 +122,7 @@
|
||||
"storybook": "^7.0.2",
|
||||
"tiny-glob": "^0.2.9",
|
||||
"typescript": "^5.0.3",
|
||||
"typescript-json-schema": "^0.55.0",
|
||||
"vite": "^4.2.1",
|
||||
"vite-plugin-static-copy": "^0.13.0",
|
||||
"vite-tsconfig-paths": "^4.0.5",
|
||||
|
||||
@@ -64,10 +64,10 @@ export class UmbInputUploadFieldElement extends FormControlMixin(UmbLitElement)
|
||||
multiple = false;
|
||||
|
||||
@state()
|
||||
_currentFiles: Blob[] = [];
|
||||
_currentFiles: File[] = [];
|
||||
|
||||
@state()
|
||||
_currentFilesTemp?: Blob[];
|
||||
_currentFilesTemp?: File[];
|
||||
|
||||
@state()
|
||||
extensions?: string[];
|
||||
@@ -114,12 +114,12 @@ export class UmbInputUploadFieldElement extends FormControlMixin(UmbLitElement)
|
||||
this.#setFiles(validated);
|
||||
}
|
||||
|
||||
#validateExtensions(): Blob[] {
|
||||
#validateExtensions(): File[] {
|
||||
// TODO: Should property editor be able to handle allowed extensions like image/* ?
|
||||
|
||||
const filesValidated: Blob[] = [];
|
||||
const filesValidated: File[] = [];
|
||||
this._currentFilesTemp?.forEach((temp) => {
|
||||
const type = temp.type.slice(temp.type.lastIndexOf('/') + 1, temp.length);
|
||||
const type = temp.type.slice(temp.type.lastIndexOf('/') + 1);
|
||||
if (this.fileExtensions?.find((x) => x === type)) filesValidated.push(temp);
|
||||
else
|
||||
this._notificationContext?.peek('danger', {
|
||||
@@ -129,7 +129,7 @@ export class UmbInputUploadFieldElement extends FormControlMixin(UmbLitElement)
|
||||
|
||||
return filesValidated;
|
||||
}
|
||||
#setFiles(files: Blob[]) {
|
||||
#setFiles(files: File[]) {
|
||||
this._currentFiles = [...this._currentFiles, ...files];
|
||||
|
||||
//TODO: set keys when possible, not names
|
||||
|
||||
@@ -4,7 +4,7 @@ import { customElement, property, state } from 'lit/decorators.js';
|
||||
import { map } from 'rxjs';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
|
||||
import type { IRoute } from '@umbraco-cms/backoffice/router';
|
||||
import type { IRoute, PageComponent } from '@umbraco-cms/backoffice/router';
|
||||
import type { UmbRouterSlotInitEvent, UmbRouterSlotChangeEvent } from '@umbraco-cms/internal/router';
|
||||
import { createExtensionElement, umbExtensionsRegistry } from '@umbraco-cms/backoffice/extensions-api';
|
||||
import type {
|
||||
@@ -120,6 +120,10 @@ export class UmbWorkspaceLayoutElement extends UmbLitElement {
|
||||
);
|
||||
}
|
||||
|
||||
private componentHasManifest(component: PageComponent): component is HTMLElement & { manifest: unknown } {
|
||||
return component ? 'manifest' in component : false;
|
||||
}
|
||||
|
||||
private _createRoutes() {
|
||||
this._routes = [];
|
||||
|
||||
@@ -136,7 +140,7 @@ export class UmbWorkspaceLayoutElement extends UmbLitElement {
|
||||
return createExtensionElement(view);
|
||||
},
|
||||
setup: (component, info) => {
|
||||
if (component && 'manifest' in component) {
|
||||
if (this.componentHasManifest(component)) {
|
||||
component.manifest = view;
|
||||
} else {
|
||||
/*
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "../../types/umbraco-package-schema.json",
|
||||
"name": "My Package",
|
||||
"version": "1.0.0",
|
||||
"extensions": [
|
||||
{
|
||||
"name": "My Dashboard",
|
||||
"alias": "myDashboard",
|
||||
|
||||
"weight": -10,
|
||||
"elementName": "my-dashboard",
|
||||
"js": "js/my-dashboard.js",
|
||||
|
||||
"type": "dashboard",
|
||||
"meta": {
|
||||
"label": "My Dashboard",
|
||||
"pathname": "my-dashboard",
|
||||
"sections": ["Umb.Section.Content"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -3,28 +3,27 @@
|
||||
// Example: import { Foo } from '@umbraco-cms/backoffice/element' -> import { Foo } from './element'
|
||||
// This is needed because the d.ts files are not in the same folder as the source files
|
||||
// and the absolute paths are not valid when the d.ts files are copied to the dist folder
|
||||
// This is only used when building the d.ts files
|
||||
// This is only used when building the d.ts files.
|
||||
//
|
||||
// Usage: node utils/transform-dts.js
|
||||
// This script also copies the package.json and README.md files to the dist/libs folder
|
||||
// and the umbraco-package-schema.json file to the Umbraco.Web.UI.New folder
|
||||
//
|
||||
// Note: This script is not used in the build process, it is only used to transform the d.ts files
|
||||
// when the d.ts files are copied to the dist folder
|
||||
|
||||
// Note: Updated to help copy the two JSON files generated from webcomponant analyzer tool
|
||||
// One is specific to VSCode HTMLCutomData for intellisense and the other is a more broad format used in storybook etc
|
||||
// Usage: node utils/move-libs.js
|
||||
|
||||
import { readdirSync, readFileSync, writeFileSync, cpSync, mkdirSync } from 'fs';
|
||||
|
||||
const rootDir = './';
|
||||
const srcDir = './libs';
|
||||
const inputDir = './dist/libs';
|
||||
const outputDir = '../Umbraco.Cms.StaticAssets/wwwroot/umbraco/backoffice/libs';
|
||||
const executableDir = '../Umbraco.Web.UI.New';
|
||||
|
||||
// Copy package files
|
||||
cpSync(`${srcDir}/package.json`, `${inputDir}/package.json`, { recursive: true });
|
||||
console.log(`Copied ${srcDir}/package.json to ${inputDir}/package.json`);
|
||||
cpSync(`${srcDir}/README.md`, `${inputDir}/README.md`, { recursive: true });
|
||||
cpSync(`${rootDir}/custom-elements.json`, `${inputDir}/custom-elements.json`, { recursive: true });
|
||||
cpSync(`${rootDir}/vscode-html-custom-data.json`, `${inputDir}/vscode-html-custom-data.json`, { recursive: true });
|
||||
console.log(`Copied ${srcDir}/README.md to ${inputDir}/README.md`);
|
||||
cpSync(`${inputDir}/umbraco-package-schema.json`, `${executableDir}/umbraco-json-schema.json`, { recursive: true });
|
||||
console.log(`Copied ${inputDir}/umbraco-package-schema.json to ${executableDir}/umbraco-package-schema.json`);
|
||||
|
||||
const libs = readdirSync(inputDir);
|
||||
|
||||
@@ -38,6 +37,8 @@ try {
|
||||
// Transform all .d.ts files and copy all other files to the output folder
|
||||
libs.forEach(lib => {
|
||||
|
||||
if (lib.endsWith('.js') === false && lib.endsWith('.js.map') === false) return;
|
||||
|
||||
console.log(`Transforming ${lib}`);
|
||||
|
||||
const dtsFile = `${inputDir}/${lib}`;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||
|
||||
import config from './vite.config';
|
||||
import { plugins } from './vite.config';
|
||||
|
||||
export default defineConfig({
|
||||
...config,
|
||||
build: {
|
||||
lib: {
|
||||
entry: 'src/app.ts',
|
||||
@@ -11,12 +11,13 @@ export default defineConfig({
|
||||
fileName: 'main',
|
||||
},
|
||||
rollupOptions: {
|
||||
external: [/^@umbraco-cms\/backoffice\//]
|
||||
external: [/^@umbraco-cms\/backoffice\//],
|
||||
},
|
||||
outDir: '../Umbraco.Cms.StaticAssets/wwwroot/umbraco/backoffice',
|
||||
emptyOutDir: false,
|
||||
sourcemap: true,
|
||||
},
|
||||
base: '/umbraco/backoffice/',
|
||||
mode: 'production'
|
||||
mode: 'production',
|
||||
plugins: [...plugins],
|
||||
});
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import { defineConfig, PluginOption } from 'vite';
|
||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||
import viteTSConfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
export const plugins: PluginOption[] = [
|
||||
viteStaticCopy({
|
||||
targets: [
|
||||
{
|
||||
src: 'public-assets/icons/*.js',
|
||||
dest: 'icons',
|
||||
},
|
||||
],
|
||||
}),
|
||||
viteTSConfigPaths(),
|
||||
];
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
build: {
|
||||
sourcemap: true,
|
||||
},
|
||||
plugins: [
|
||||
viteStaticCopy({
|
||||
targets: [
|
||||
{
|
||||
src: 'public-assets/icons/*.js',
|
||||
dest: 'icons',
|
||||
},
|
||||
{
|
||||
src: 'public-assets/App_Plugins/*.js',
|
||||
dest: 'App_Plugins',
|
||||
},
|
||||
],
|
||||
}),
|
||||
viteTSConfigPaths(),
|
||||
],
|
||||
plugins,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user