Socket
Socket
Sign inDemoInstall

@ms-cloudpack/common-types

Package Overview
Dependencies
Maintainers
3
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ms-cloudpack/common-types - npm Package Compare versions

Comparing version 0.9.0 to 0.10.0

lib/ExpandedSourcePath.d.ts

6

lib/AppConfig.d.ts
import type { DevServer } from './DevServer.js';
import type { Features } from './Features.js';
import type { PackageSettings } from './PackageSettings.js';
import type { ShorthandRoute } from './Route.js';
import type { TelemetryConfig } from './TelemetryConfig.js';

@@ -73,2 +74,7 @@ /**

/**
* Defines what routes to support from the app server, and which scripts will be loaded
* for each.
*/
routes?: ShorthandRoute[];
/**
* A list of package names that should never be excluded or included from the bundle.

@@ -75,0 +81,0 @@ */

12

lib/CloudpackConfig.d.ts
import type { GeneratedConfig } from './GeneratedConfig.js';
import type { AppConfig } from './AppConfig.js';
import type { BundleMode } from './BundleMode.js';
import type { Route } from './Route.js';
import type { DevServer } from './DevServer.js';
/**
* The merged result of user-provided and generated configuration for Cloudpack.
*/
export type CloudpackConfig = AppConfig & {
export type CloudpackConfig = Omit<AppConfig, 'routes' | 'devServer'> & {
/**

@@ -13,2 +15,6 @@ * The path to the app's package.

/**
* Dev server settings.
*/
devServer?: Omit<DevServer, 'routes'>;
/**
* Mode to run the app in.

@@ -21,3 +27,7 @@ */

generated: GeneratedConfig;
/**
* Routes which have been expanded from shorthand entries.
*/
routes?: Route[];
};
//# sourceMappingURL=CloudpackConfig.d.ts.map

6

lib/DevServer.d.ts
import type { HttpsConfig } from './HttpsConfig.js';
import type { Route } from './Route.js';
import type { ShorthandRoute } from './Route.js';
export interface DevServer {

@@ -34,6 +34,6 @@ /**

/**
* If provided, will register routes with the dev server to host various pages.
* @deprecated - Routes has moved to the root of the config.
*/
routes?: Route[];
routes?: ShorthandRoute[];
}
//# sourceMappingURL=DevServer.d.ts.map

@@ -1,3 +0,1 @@

/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import type { ServerOptions } from 'https';

@@ -4,0 +2,0 @@ import type { IncomingMessage, ServerResponse } from 'http';

@@ -0,1 +1,2 @@

import type { ExpandedSourcePath } from './ExpandedSourcePath.js';
export interface SharedRouteOptions {

@@ -11,3 +12,3 @@ /**

*/
export interface RenderedRoute extends SharedRouteOptions {
export interface ShorthandRenderedRoute extends SharedRouteOptions {
/**

@@ -23,3 +24,10 @@ * Path to a .js or .html file used for rendering the route. If a script is provided, it must

exportEntry?: string;
/**
* To be implemented. The source entry or entries to be included on the page for this route.
*/
entry?: (string | ExpandedSourcePath)[];
}
export type RenderedRoute = Omit<ShorthandRenderedRoute, 'entry'> & {
entry?: ExpandedSourcePath[];
};
/**

@@ -45,2 +53,3 @@ * A route with a staticPath property serves static files from the specified path.

}
export type ShorthandRoute = ShorthandRenderedRoute | StaticRoute | BootstrapRoute;
export type Route = RenderedRoute | StaticRoute | BootstrapRoute;

@@ -47,0 +56,0 @@ /**

{
"name": "@ms-cloudpack/common-types",
"version": "0.9.0",
"version": "0.10.0",
"description": "Common types for Cloudpack.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -90,2 +90,9 @@ {

},
"routes": {
"type": "array",
"items": {
"$ref": "#/definitions/ShorthandRoute"
},
"description": "Defines what routes to support from the app server, and which scripts will be loaded for each."
},
"neverExcludeDependencies": {

@@ -144,5 +151,5 @@ "type": "array",

"items": {
"$ref": "#/definitions/Route"
"$ref": "#/definitions/ShorthandRoute"
},
"description": "If provided, will register routes with the dev server to host various pages."
"deprecated": "- Routes has moved to the root of the config."
}

@@ -435,6 +442,6 @@ },

},
"Route": {
"ShorthandRoute": {
"anyOf": [
{
"$ref": "#/definitions/RenderedRoute"
"$ref": "#/definitions/ShorthandRenderedRoute"
},

@@ -449,3 +456,3 @@ {

},
"RenderedRoute": {
"ShorthandRenderedRoute": {
"type": "object",

@@ -464,2 +471,16 @@ "properties": {

"description": "The key in the exports map which represents the entry point app script for this route. Default is '.', meaning the main package export key."
},
"entry": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/definitions/ExpandedSourcePath"
}
]
},
"description": "To be implemented. The source entry or entries to be included on the page for this route."
}

@@ -473,2 +494,25 @@ },

},
"ExpandedSourcePath": {
"type": "object",
"properties": {
"sourcePath": {
"type": "string",
"description": "The relative path to the source file. (e.g. `./src/index.ts`)"
},
"importPath": {
"type": "string",
"description": "The path to import the resulting bundled output from. This would represent the key in the import map entry to be imported. (e.g. `.` represents the default package export.)"
},
"requestPath": {
"type": "string",
"description": "The path to be requested by the browser. This would present the value in the import map entry to be requested. (e.g. `./lib/index.js`)"
}
},
"required": [
"sourcePath",
"importPath",
"requestPath"
],
"additionalProperties": false
},
"StaticRoute": {

@@ -475,0 +519,0 @@ "type": "object",

@@ -94,2 +94,9 @@ {

},
"routes": {
"type": "array",
"items": {
"$ref": "#/definitions/ShorthandRoute"
},
"description": "Defines what routes to support from the app server, and which scripts will be loaded for each."
},
"neverExcludeDependencies": {

@@ -145,5 +152,5 @@ "type": "array",

"items": {
"$ref": "#/definitions/Route"
"$ref": "#/definitions/ShorthandRoute"
},
"description": "If provided, will register routes with the dev server to host various pages."
"deprecated": "- Routes has moved to the root of the config."
}

@@ -436,6 +443,6 @@ },

},
"Route": {
"ShorthandRoute": {
"anyOf": [
{
"$ref": "#/definitions/RenderedRoute"
"$ref": "#/definitions/ShorthandRenderedRoute"
},

@@ -450,3 +457,3 @@ {

},
"RenderedRoute": {
"ShorthandRenderedRoute": {
"type": "object",

@@ -465,2 +472,16 @@ "properties": {

"description": "The key in the exports map which represents the entry point app script for this route. Default is '.', meaning the main package export key."
},
"entry": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/definitions/ExpandedSourcePath"
}
]
},
"description": "To be implemented. The source entry or entries to be included on the page for this route."
}

@@ -474,2 +495,25 @@ },

},
"ExpandedSourcePath": {
"type": "object",
"properties": {
"sourcePath": {
"type": "string",
"description": "The relative path to the source file. (e.g. `./src/index.ts`)"
},
"importPath": {
"type": "string",
"description": "The path to import the resulting bundled output from. This would represent the key in the import map entry to be imported. (e.g. `.` represents the default package export.)"
},
"requestPath": {
"type": "string",
"description": "The path to be requested by the browser. This would present the value in the import map entry to be requested. (e.g. `./lib/index.js`)"
}
},
"required": [
"sourcePath",
"importPath",
"requestPath"
],
"additionalProperties": false
},
"StaticRoute": {

@@ -476,0 +520,0 @@ "type": "object",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc