@deepkit/angular-ssr 1.0.15 → 1.0.18
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/CHANGELOG.md +4 -0
- package/dist/cjs/index.js +9 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/src/angular.js +11 -12
- package/dist/cjs/src/angular.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/src/angular.js +10 -11
- package/dist/esm/src/angular.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/angular.ts +2 -2
- package/tsconfig.json +3 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.18](https://github.com/deepkit/deepkit-framework/compare/v1.0.17...v1.0.18) (2025-09-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @deepkit/angular-ssr
|
|
9
|
+
|
|
6
10
|
## [1.0.15](https://github.com/deepkit/deepkit-framework/compare/v1.0.14...v1.0.15) (2025-06-26)
|
|
7
11
|
|
|
8
12
|
### Features
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Deepkit Framework
|
|
4
|
-
* Copyright (C) 2021 Deepkit UG, Marc J. Schmidt
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the MIT License.
|
|
8
|
-
*
|
|
9
|
-
* You should have received a copy of the MIT License along with this program.
|
|
10
|
-
*/
|
|
11
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
3
|
if (k2 === undefined) k2 = k;
|
|
13
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -23,5 +14,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
23
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
24
15
|
};
|
|
25
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/*
|
|
18
|
+
* Deepkit Framework
|
|
19
|
+
* Copyright (C) 2021 Deepkit UG, Marc J. Schmidt
|
|
20
|
+
*
|
|
21
|
+
* This program is free software: you can redistribute it and/or modify
|
|
22
|
+
* it under the terms of the MIT License.
|
|
23
|
+
*
|
|
24
|
+
* You should have received a copy of the MIT License along with this program.
|
|
25
|
+
*/
|
|
26
26
|
__exportStar(require("./src/angular.js"), exports);
|
|
27
27
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;GAQG;AAEH,mDAAiC"}
|
package/dist/cjs/src/angular.js
CHANGED
|
@@ -29,8 +29,8 @@ const event_1 = require("@deepkit/event");
|
|
|
29
29
|
const app_1 = require("@deepkit/app");
|
|
30
30
|
const framework_1 = require("@deepkit/framework");
|
|
31
31
|
const logger_1 = require("@deepkit/logger");
|
|
32
|
-
const
|
|
33
|
-
const
|
|
32
|
+
const path_1 = require("path");
|
|
33
|
+
const url_1 = require("url");
|
|
34
34
|
class AngularConfig {
|
|
35
35
|
constructor() {
|
|
36
36
|
/**
|
|
@@ -52,8 +52,8 @@ class AngularConfig {
|
|
|
52
52
|
*/
|
|
53
53
|
this.moduleUrl = '';
|
|
54
54
|
}
|
|
55
|
+
static { this.__type = ['publicBaseUrl', function () { return ''; }, 'serverBaseUrl', function () { return ''; }, 'moduleUrl', function () { return ''; }, 'AngularConfig', '&3!>"&3#>$&3%>&5w\'']; }
|
|
55
56
|
}
|
|
56
|
-
AngularConfig.__type = ['publicBaseUrl', function () { return ''; }, 'serverBaseUrl', function () { return ''; }, 'moduleUrl', function () { return ''; }, 'AngularConfig', '&3!>"&3#>$&3%>&5w\''];
|
|
57
57
|
/**
|
|
58
58
|
* This object is available angular providers as DI token `REQUEST_CONTEXT`.
|
|
59
59
|
*/
|
|
@@ -64,14 +64,14 @@ class AngularRequestContext {
|
|
|
64
64
|
this.serverBaseUrl = config.serverBaseUrl;
|
|
65
65
|
this.publicBaseUrl = config.publicBaseUrl;
|
|
66
66
|
}
|
|
67
|
+
static { this.__type = ['serverBaseUrl', function () { return ''; }, 'publicBaseUrl', function () { return ''; }, () => AngularConfig, 'config', 'constructor', 'AngularRequestContext', '&3!>"&3#>$PP7%2&"0\'5w(']; }
|
|
67
68
|
}
|
|
68
|
-
AngularRequestContext.__type = ['serverBaseUrl', function () { return ''; }, 'publicBaseUrl', function () { return ''; }, () => AngularConfig, 'config', 'constructor', 'AngularRequestContext', '&3!>"&3#>$PP7%2&"0\'5w('];
|
|
69
69
|
class AngularState {
|
|
70
70
|
constructor() {
|
|
71
71
|
this.ngApp = new node_1.AngularNodeAppEngine();
|
|
72
72
|
}
|
|
73
|
+
static { this.__type = [() => node_1.AngularNodeAppEngine, 'ngApp', function () { return new node_1.AngularNodeAppEngine(); }, 'AngularState', 'P7!3">#5w$']; }
|
|
73
74
|
}
|
|
74
|
-
AngularState.__type = [() => node_1.AngularNodeAppEngine, 'ngApp', function () { return new node_1.AngularNodeAppEngine(); }, 'AngularState', 'P7!3">#5w$'];
|
|
75
75
|
class AngularListener {
|
|
76
76
|
constructor(requestContext, state) {
|
|
77
77
|
this.requestContext = requestContext;
|
|
@@ -97,8 +97,8 @@ class AngularListener {
|
|
|
97
97
|
parameters: {},
|
|
98
98
|
}));
|
|
99
99
|
}
|
|
100
|
+
static { this.__type = [() => AngularRequestContext, 'requestContext', () => AngularState, 'state', 'constructor', () => http_1.httpWorkflow.onRoute.event, 'event', 'onRoute', 'AngularListener', 'PP7!2":P7#2$:"0%Pi&2\'"0(5w)']; }
|
|
100
101
|
}
|
|
101
|
-
AngularListener.__type = [() => AngularRequestContext, 'requestContext', () => AngularState, 'state', 'constructor', () => http_1.httpWorkflow.onRoute.event, 'event', 'onRoute', 'AngularListener', 'PP7!2":P7#2$:"0%Pi&2\'"0(5w)'];
|
|
102
102
|
__decorate([
|
|
103
103
|
event_1.eventDispatcher.listen(http_1.httpWorkflow.onRoute, 102) //102 after 101=static listener, 100=default listener
|
|
104
104
|
,
|
|
@@ -111,7 +111,7 @@ class AngularStaticListener {
|
|
|
111
111
|
this.config = config;
|
|
112
112
|
this.localPath = '';
|
|
113
113
|
this.path = '/'; //public path
|
|
114
|
-
this.localPath = (0,
|
|
114
|
+
this.localPath = (0, path_1.resolve)((0, path_1.dirname)((0, url_1.fileURLToPath)(this.config.moduleUrl)), '../browser');
|
|
115
115
|
}
|
|
116
116
|
onRoute(event) {
|
|
117
117
|
if (event.sent)
|
|
@@ -122,8 +122,8 @@ class AngularStaticListener {
|
|
|
122
122
|
return;
|
|
123
123
|
return (0, http_1.staticOnRoute)(event, this.path, this.localPath);
|
|
124
124
|
}
|
|
125
|
+
static { this.__type = ['localPath', function () { return ''; }, 'path', function () { return '/'; }, () => AngularConfig, 'config', 'constructor', () => http_1.httpWorkflow.onRoute.event, 'event', 'onRoute', 'AngularStaticListener', '&3!>"&3#>$PP7%2&<"0\'Pi(2)"0*5w+']; }
|
|
125
126
|
}
|
|
126
|
-
AngularStaticListener.__type = ['localPath', function () { return ''; }, 'path', function () { return '/'; }, () => AngularConfig, 'config', 'constructor', () => http_1.httpWorkflow.onRoute.event, 'event', 'onRoute', 'AngularStaticListener', '&3!>"&3#>$PP7%2&<"0\'Pi(2)"0*5w+'];
|
|
127
127
|
__decorate([
|
|
128
128
|
event_1.eventDispatcher.listen(http_1.httpWorkflow.onRoute, 101) //after default route listener at 100
|
|
129
129
|
,
|
|
@@ -152,8 +152,7 @@ class RequestHandler {
|
|
|
152
152
|
this.started = false;
|
|
153
153
|
}
|
|
154
154
|
create() {
|
|
155
|
-
|
|
156
|
-
const global = ((_a = globalThis).deepkitAngular || (_a.deepkitAngular = {}));
|
|
155
|
+
const global = (globalThis.deepkitAngular ||= {});
|
|
157
156
|
const waitForClose = global.server ? global.server.close() : Promise.resolve();
|
|
158
157
|
const mainModule = (0, node_1.isMainModule)(this.config.moduleUrl);
|
|
159
158
|
// We only listen for process signals in the main module.
|
|
@@ -200,9 +199,9 @@ class RequestHandler {
|
|
|
200
199
|
}
|
|
201
200
|
}, ['req', 'res', 'next', '', 'P"2!"2""2#"/$']));
|
|
202
201
|
}
|
|
202
|
+
static { this.__type = ['started', function () { return false; }, () => AngularConfig, 'config', () => logger_1.Logger, 'logger', () => AngularRequestContext, 'requestContext', () => http_1.HttpKernel, 'http', () => framework_1.ApplicationServer, 'server', 'constructor', 'NodeRequestHandlerFunction', 'create', 'RequestHandler', ')3!<>"PP7#2$<P7%2&<P7\'2(<P7)2*<P7+2,<"0-P"w.0/5w0']; }
|
|
203
203
|
}
|
|
204
204
|
exports.RequestHandler = RequestHandler;
|
|
205
|
-
RequestHandler.__type = ['started', function () { return false; }, () => AngularConfig, 'config', () => logger_1.Logger, 'logger', () => AngularRequestContext, 'requestContext', () => http_1.HttpKernel, 'http', () => framework_1.ApplicationServer, 'server', 'constructor', 'NodeRequestHandlerFunction', 'create', 'RequestHandler', ')3!<>"PP7#2$<P7%2&<P7\'2(<P7)2*<P7+2,<"0-P"w.0/5w0'];
|
|
206
205
|
class AngularModule extends (0, app_1.createModuleClass)({
|
|
207
206
|
name: 'angular',
|
|
208
207
|
config: AngularConfig,
|
|
@@ -223,7 +222,7 @@ class AngularModule extends (0, app_1.createModuleClass)({
|
|
|
223
222
|
AngularStaticListener,
|
|
224
223
|
],
|
|
225
224
|
}) {
|
|
225
|
+
static { this.__type = [() => (0, app_1.createModuleClass)({ name: "angular", config: AngularConfig, providers: [RequestHandler, AngularRequestContext, AngularStaticListener, AngularState], exports: [RequestHandler, AngularRequestContext, AngularStaticListener, AngularState], listeners: [AngularListener, AngularStaticListener] }), 'AngularModule', 'P7!5w"']; }
|
|
226
226
|
}
|
|
227
227
|
exports.AngularModule = AngularModule;
|
|
228
|
-
AngularModule.__type = [() => (0, app_1.createModuleClass)({ name: "angular", config: AngularConfig, providers: [RequestHandler, AngularRequestContext, AngularStaticListener, AngularState], exports: [RequestHandler, AngularRequestContext, AngularStaticListener, AngularState], listeners: [AngularListener, AngularStaticListener] }), 'AngularModule', 'P7!5w"'];
|
|
229
228
|
//# sourceMappingURL=angular.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular.js","sourceRoot":"","sources":["../../../src/angular.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;GAQG;AAEH,4CAA0J;AAC1J,wCAAmI;AACnI,0CAAiD;AACjD,sCAAiD;AACjD,kDAAuD;AACvD,4CAAyC;AACzC
|
|
1
|
+
{"version":3,"file":"angular.js","sourceRoot":"","sources":["../../../src/angular.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;GAQG;AAEH,4CAA0J;AAC1J,wCAAmI;AACnI,0CAAiD;AACjD,sCAAiD;AACjD,kDAAuD;AACvD,4CAAyC;AACzC,+BAAwC;AACxC,6BAAoC;AAEpC,MAAM,aAAa;IAAnB;QACI;;;;;WAKG;QACH,kBAAa,GAAW,EAAE,CAAC;QAE3B;;;;;WAKG;QACH,kBAAa,GAAW,EAAE,CAAC;QAE3B;;WAEG;QACH,cAAS,GAAW,EAAE,CAAC;KAC1B;kEAd2B,EAAE,2CAQF,EAAE,uCAKN,EAAE;;AAG1B;;GAEG;AACH,MAAM,qBAAqB;IAIvB,YAAY,MAAqB;QAHjC,kBAAa,GAAW,EAAE,CAAC;QAC3B,kBAAa,GAAW,EAAE,CAAC;QAG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