Skip to content

Commit

Permalink
Merge pull request #74 from spring-media/PLUS-2215
Browse files Browse the repository at this point in the history
PLUS-2215: Add a new queue in the waiting room
  • Loading branch information
naoufalelh authored Oct 30, 2024
2 parents 8f5c834 + 7db0cd0 commit bcc5b13
Show file tree
Hide file tree
Showing 7 changed files with 455 additions and 424 deletions.
60 changes: 30 additions & 30 deletions dist/apiprovide.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@

Object.defineProperty(exports, '__esModule', { value: true });

function provide(packageNameActual, packActual) {
// -- START -- static loader
var unresolvedPackages = {};
var providedPackages = {};
var loaderName = "pssmasloader";
var loader = (window[loaderName] = window[loaderName] || {
_: {
u: unresolvedPackages,
p: providedPackages
},
require: function (packageName, cb) {
var pack = providedPackages[packageName];
if (pack !== undefined) {
cb(pack, null);
}
else {
unresolvedPackages[packageName] = unresolvedPackages[packageName] || [];
unresolvedPackages[packageName].push(cb);
}
}
});
unresolvedPackages = loader._.u;
providedPackages = loader._.p;
// -- END -- static loader
var unresolvedRequires = unresolvedPackages[packageNameActual] || [];
providedPackages[packageNameActual] = packActual;
for (var i = 0; i < unresolvedRequires.length; i++) {
unresolvedRequires[i](packActual, null);
}
return packActual;
function provide(packageNameActual, packActual) {
// -- START -- static loader
var unresolvedPackages = {};
var providedPackages = {};
var loaderName = "pssmasloader";
var loader = (window[loaderName] = window[loaderName] || {
_: {
u: unresolvedPackages,
p: providedPackages
},
require: function (packageName, cb) {
var pack = providedPackages[packageName];
if (pack !== undefined) {
cb(pack, null);
}
else {
unresolvedPackages[packageName] = unresolvedPackages[packageName] || [];
unresolvedPackages[packageName].push(cb);
}
}
});
unresolvedPackages = loader._.u;
providedPackages = loader._.p;
// -- END -- static loader
var unresolvedRequires = unresolvedPackages[packageNameActual] || [];
providedPackages[packageNameActual] = packActual;
for (var i = 0; i < unresolvedRequires.length; i++) {
unresolvedRequires[i](packActual, null);
}
return packActual;
}

exports.provide = provide;
2 changes: 1 addition & 1 deletion dist/apiprovide.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare function provide(packageNameActual: string, packActual: any): any;
export declare function provide(packageNameActual: string, packActual: any): any;
60 changes: 30 additions & 30 deletions dist/apiprovide.esm.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
function provide(packageNameActual, packActual) {
// -- START -- static loader
var unresolvedPackages = {};
var providedPackages = {};
var loaderName = "pssmasloader";
var loader = (window[loaderName] = window[loaderName] || {
_: {
u: unresolvedPackages,
p: providedPackages
},
require: function (packageName, cb) {
var pack = providedPackages[packageName];
if (pack !== undefined) {
cb(pack, null);
}
else {
unresolvedPackages[packageName] = unresolvedPackages[packageName] || [];
unresolvedPackages[packageName].push(cb);
}
}
});
unresolvedPackages = loader._.u;
providedPackages = loader._.p;
// -- END -- static loader
var unresolvedRequires = unresolvedPackages[packageNameActual] || [];
providedPackages[packageNameActual] = packActual;
for (var i = 0; i < unresolvedRequires.length; i++) {
unresolvedRequires[i](packActual, null);
}
return packActual;
function provide(packageNameActual, packActual) {
// -- START -- static loader
var unresolvedPackages = {};
var providedPackages = {};
var loaderName = "pssmasloader";
var loader = (window[loaderName] = window[loaderName] || {
_: {
u: unresolvedPackages,
p: providedPackages
},
require: function (packageName, cb) {
var pack = providedPackages[packageName];
if (pack !== undefined) {
cb(pack, null);
}
else {
unresolvedPackages[packageName] = unresolvedPackages[packageName] || [];
unresolvedPackages[packageName].push(cb);
}
}
});
unresolvedPackages = loader._.u;
providedPackages = loader._.p;
// -- END -- static loader
var unresolvedRequires = unresolvedPackages[packageNameActual] || [];
providedPackages[packageNameActual] = packActual;
for (var i = 0; i < unresolvedRequires.length; i++) {
unresolvedRequires[i](packActual, null);
}
return packActual;
}

export { provide };
182 changes: 91 additions & 91 deletions dist/ps-web-apis.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,102 +2,102 @@

Object.defineProperty(exports, '__esModule', { value: true });

function provide(packageNameActual, packActual) {
// -- START -- static loader
var unresolvedPackages = {};
var providedPackages = {};
var loaderName = "pssmasloader";
var loader = (window[loaderName] = window[loaderName] || {
_: {
u: unresolvedPackages,
p: providedPackages
},
require: function (packageName, cb) {
var pack = providedPackages[packageName];
if (pack !== undefined) {
cb(pack, null);
}
else {
unresolvedPackages[packageName] = unresolvedPackages[packageName] || [];
unresolvedPackages[packageName].push(cb);
}
}
});
unresolvedPackages = loader._.u;
providedPackages = loader._.p;
// -- END -- static loader
var unresolvedRequires = unresolvedPackages[packageNameActual] || [];
providedPackages[packageNameActual] = packActual;
for (var i = 0; i < unresolvedRequires.length; i++) {
unresolvedRequires[i](packActual, null);
}
return packActual;
function provide(packageNameActual, packActual) {
// -- START -- static loader
var unresolvedPackages = {};
var providedPackages = {};
var loaderName = "pssmasloader";
var loader = (window[loaderName] = window[loaderName] || {
_: {
u: unresolvedPackages,
p: providedPackages
},
require: function (packageName, cb) {
var pack = providedPackages[packageName];
if (pack !== undefined) {
cb(pack, null);
}
else {
unresolvedPackages[packageName] = unresolvedPackages[packageName] || [];
unresolvedPackages[packageName].push(cb);
}
}
});
unresolvedPackages = loader._.u;
providedPackages = loader._.p;
// -- END -- static loader
var unresolvedRequires = unresolvedPackages[packageNameActual] || [];
providedPackages[packageNameActual] = packActual;
for (var i = 0; i < unresolvedRequires.length; i++) {
unresolvedRequires[i](packActual, null);
}
return packActual;
}

function requirePackage(name) {
// -- START -- static loader
var unresolvedPackages = {};
var providedPackages = {};
var loaderName = "pssmasloader";
// set or reuse existing loader implementation
var loader = (window[loaderName] = window[loaderName] || {
// Requires packageName and returns it via callback
require: function (packageName, cb) {
var pack = providedPackages[packageName];
if (pack !== undefined) {
// -- will callback directly if required functionality was already provided
cb(pack, null);
}
else {
// -- will queue callbacks if required functionality is not yet available
unresolvedPackages[packageName] = unresolvedPackages[packageName] || [];
unresolvedPackages[packageName].push(cb);
}
},
// private state
_: {
u: unresolvedPackages,
p: providedPackages
}
});
// -- END -- static loader
return new Promise(function (resolve, reject) {
loader.require(name, function (res, error) {
if (error) {
reject(error);
}
else {
resolve(res);
}
});
});
}
function whoamiV1() {
return requirePackage("whoami:v1");
}
function utilsV1() {
return requirePackage("utils:v1");
}
function waitingRoomV1() {
return requireApi("waiting_room:v1");
}
function abV1() {
return requirePackage("ab:v1");
}
function CligV1() {
return requirePackage("ppclig:v1");
}
function CligV2() {
return requirePackage("clig:v2");
}
var provideApi = provide;
function requirePackage(name) {
// -- START -- static loader
var unresolvedPackages = {};
var providedPackages = {};
var loaderName = "pssmasloader";
// set or reuse existing loader implementation
var loader = (window[loaderName] = window[loaderName] || {
// Requires packageName and returns it via callback
require: function (packageName, cb) {
var pack = providedPackages[packageName];
if (pack !== undefined) {
// -- will callback directly if required functionality was already provided
cb(pack, null);
}
else {
// -- will queue callbacks if required functionality is not yet available
unresolvedPackages[packageName] = unresolvedPackages[packageName] || [];
unresolvedPackages[packageName].push(cb);
}
},
// private state
_: {
u: unresolvedPackages,
p: providedPackages
}
});
// -- END -- static loader
return new Promise(function (resolve, reject) {
loader.require(name, function (res, error) {
if (error) {
reject(error);
}
else {
resolve(res);
}
});
});
}
function whoamiV1() {
return requirePackage("whoami:v1");
}
function utilsV1() {
return requirePackage("utils:v1");
}
function waitingRoomV1() {
return requireApi("waiting_room:v1");
}
function abV1() {
return requirePackage("ab:v1");
}
function CligV1() {
return requirePackage("ppclig:v1");
}
function CligV2() {
return requirePackage("clig:v2");
}
var provideApi = provide;
var requireApi = requirePackage;

exports.whoamiV1 = whoamiV1;
exports.utilsV1 = utilsV1;
exports.waitingRoomV1 = waitingRoomV1;
exports.abV1 = abV1;
exports.CligV1 = CligV1;
exports.CligV2 = CligV2;
exports.abV1 = abV1;
exports.provideApi = provideApi;
exports.requireApi = requireApi;
exports.utilsV1 = utilsV1;
exports.waitingRoomV1 = waitingRoomV1;
exports.whoamiV1 = whoamiV1;
Loading

0 comments on commit bcc5b13

Please sign in to comment.