qcobjects-cli 2.5.103-beta → 2.5.105-beta
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/VERSION +1 -1
- package/build-esbuild.js +65 -12
- package/package.json +55 -21
- package/public/browser/com.qcobjects.cli.commands.jira.client_services.js +66 -55
- package/public/browser/com.qcobjects.cli.commands.jira.client_services.js.map +2 -2
- package/public/browser/com.qcobjects.cli.commands.jira.js +138 -93
- package/public/browser/com.qcobjects.cli.commands.jira.js.map +4 -4
- package/public/browser/com.qcobjects.cli.commands.js +371 -14
- package/public/browser/com.qcobjects.cli.commands.js.map +4 -4
- package/public/browser/com.qcobjects.cli.commands.version.js +220 -214
- package/public/browser/com.qcobjects.cli.commands.version.js.map +2 -2
- package/public/browser/index.js +4042 -13
- package/public/browser/index.js.map +4 -4
- package/public/browser/org.qcobjects.common.pipelog.js +37 -24
- package/public/browser/org.qcobjects.common.pipelog.js.map +2 -2
- package/public/browser/org.qcobjects.enterprise.commands.js +108 -117
- package/public/browser/org.qcobjects.enterprise.commands.js.map +3 -3
- package/public/browser/org.quickcorp.qcobjects.api.client_services.js +64 -55
- package/public/browser/org.quickcorp.qcobjects.api.client_services.js.map +2 -2
- package/public/browser/org.quickcorp.qcobjects.cli.js +1280 -379
- package/public/browser/org.quickcorp.qcobjects.cli.js.map +4 -4
- package/public/browser/org.quickcorp.qcobjects.defaultsettings.js +373 -359
- package/public/browser/org.quickcorp.qcobjects.defaultsettings.js.map +2 -2
- package/public/browser/qcobjects-cli.js +4042 -13
- package/public/browser/qcobjects-cli.js.map +4 -4
- package/public/browser/templates/apps/spa-local.html +28 -0
- package/public/browser/templates/apps/spa-local.js +65 -0
- package/public/browser/templates/pwa/sw.js +112 -0
- package/public/cjs/com.qcobjects.cli.commands.cjs +377 -6
- package/public/cjs/com.qcobjects.cli.commands.cjs.map +4 -4
- package/public/cjs/com.qcobjects.cli.commands.jira.cjs +82 -24
- package/public/cjs/com.qcobjects.cli.commands.jira.cjs.map +4 -4
- package/public/cjs/com.qcobjects.cli.commands.jira.client_services.cjs +25 -1
- package/public/cjs/com.qcobjects.cli.commands.jira.client_services.cjs.map +2 -2
- package/public/cjs/com.qcobjects.cli.commands.version.cjs +25 -6
- package/public/cjs/com.qcobjects.cli.commands.version.cjs.map +2 -2
- package/public/cjs/index.cjs +4042 -13
- package/public/cjs/index.cjs.map +4 -4
- package/public/cjs/org.qcobjects.common.pipelog.cjs +40 -14
- package/public/cjs/org.qcobjects.common.pipelog.cjs.map +2 -2
- package/public/cjs/org.qcobjects.enterprise.commands.cjs +38 -34
- package/public/cjs/org.qcobjects.enterprise.commands.cjs.map +3 -3
- package/public/cjs/org.quickcorp.qcobjects.api.client_services.cjs +24 -2
- package/public/cjs/org.quickcorp.qcobjects.api.client_services.cjs.map +2 -2
- package/public/cjs/org.quickcorp.qcobjects.cli.cjs +1032 -118
- package/public/cjs/org.quickcorp.qcobjects.cli.cjs.map +4 -4
- package/public/cjs/org.quickcorp.qcobjects.defaultsettings.cjs +362 -334
- package/public/cjs/org.quickcorp.qcobjects.defaultsettings.cjs.map +2 -2
- package/public/cjs/qcobjects-cli.cjs +4047 -13
- package/public/cjs/qcobjects-cli.cjs.map +4 -4
- package/public/cjs/templates/apps/spa-local.html +28 -0
- package/public/cjs/templates/apps/spa-local.js +65 -0
- package/public/cjs/templates/pwa/sw.js +112 -0
- package/public/esm/com.qcobjects.cli.commands.jira.client_services.mjs +50 -57
- package/public/esm/com.qcobjects.cli.commands.jira.client_services.mjs.map +2 -2
- package/public/esm/com.qcobjects.cli.commands.jira.mjs +119 -94
- package/public/esm/com.qcobjects.cli.commands.jira.mjs.map +4 -4
- package/public/esm/com.qcobjects.cli.commands.mjs +357 -16
- package/public/esm/com.qcobjects.cli.commands.mjs.map +4 -4
- package/public/esm/com.qcobjects.cli.commands.version.mjs +204 -216
- package/public/esm/com.qcobjects.cli.commands.version.mjs.map +2 -2
- package/public/esm/index.mjs +4043 -13
- package/public/esm/index.mjs.map +4 -4
- package/public/esm/org.qcobjects.common.pipelog.mjs +21 -26
- package/public/esm/org.qcobjects.common.pipelog.mjs.map +2 -2
- package/public/esm/org.qcobjects.enterprise.commands.mjs +92 -119
- package/public/esm/org.qcobjects.enterprise.commands.mjs.map +3 -3
- package/public/esm/org.quickcorp.qcobjects.api.client_services.mjs +48 -57
- package/public/esm/org.quickcorp.qcobjects.api.client_services.mjs.map +2 -2
- package/public/esm/org.quickcorp.qcobjects.cli.mjs +1266 -380
- package/public/esm/org.quickcorp.qcobjects.cli.mjs.map +4 -4
- package/public/esm/org.quickcorp.qcobjects.defaultsettings.mjs +357 -361
- package/public/esm/org.quickcorp.qcobjects.defaultsettings.mjs.map +2 -2
- package/public/esm/qcobjects-cli.mjs +4046 -14
- package/public/esm/qcobjects-cli.mjs.map +4 -4
- package/public/esm/templates/apps/spa-local.html +28 -0
- package/public/esm/templates/apps/spa-local.js +65 -0
- package/public/esm/templates/pwa/sw.js +112 -0
- package/public/index.d.ts +140 -10
- package/src/com.qcobjects.cli.commands.jira.client_services.ts +19 -21
- package/src/com.qcobjects.cli.commands.jira.ts +11 -34
- package/src/com.qcobjects.cli.commands.ts +3 -9
- package/src/com.qcobjects.cli.commands.version.ts +1 -9
- package/src/org.qcobjects.common.pipelog.ts +18 -15
- package/src/org.qcobjects.enterprise.commands.ts +29 -50
- package/src/org.quickcorp.qcobjects.api.client_services.ts +1 -4
- package/src/org.quickcorp.qcobjects.cli.ts +28 -57
- package/src/org.quickcorp.qcobjects.defaultsettings.ts +359 -355
- package/src/qcobjects-cli.ts +4 -5
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html class="no-js" lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
|
|
8
|
+
<!-- This is a wide open CSP declaration. To lock this down for production, see below. -->
|
|
9
|
+
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: https://ssl.gstatic.com; img-src * 'self' data:; child-src *; style-src * 'self' 'unsafe-inline' 'unsafe-eval'; script-src * 'self' 'unsafe-inline' 'unsafe-eval'; connect-src * 'self' 'unsafe-inline' 'unsafe-eval';media-src *">
|
|
10
|
+
<title>{{title}}</title>
|
|
11
|
+
<script type="text/javascript" src="./node_modules/qcobjects/QCObjects.js"></script>
|
|
12
|
+
</head>
|
|
13
|
+
|
|
14
|
+
<body>
|
|
15
|
+
|
|
16
|
+
<component name="main">
|
|
17
|
+
<routing path="/" name="main" />
|
|
18
|
+
<routing path="#" name="main" />
|
|
19
|
+
<routing path="" name="main" />
|
|
20
|
+
<routing path="page1" name="page1" />
|
|
21
|
+
<routing path="page2" name="page2" />
|
|
22
|
+
</component>
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" src="js/init.js"></script>
|
|
25
|
+
|
|
26
|
+
</body>
|
|
27
|
+
|
|
28
|
+
</html>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const path = require("path");
|
|
3
|
+
const absolutePath = path.resolve( __dirname, "./" );
|
|
4
|
+
|
|
5
|
+
const http2 = require("http2");
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
const mime = require("mime");
|
|
8
|
+
|
|
9
|
+
Import("org.quickcorp.qcobjects.main.file");
|
|
10
|
+
|
|
11
|
+
Package("org.quickcorp.cli.templates.app.spa_local",[
|
|
12
|
+
Class("AppTemplate",{
|
|
13
|
+
name:"app/index.html",
|
|
14
|
+
template:"",
|
|
15
|
+
templateURI:"spa-local.html",
|
|
16
|
+
body:"",
|
|
17
|
+
compileAndSave:false,
|
|
18
|
+
save:function (){
|
|
19
|
+
var appTemplateInstance = this;
|
|
20
|
+
fs.mkdir("app/",()=>{
|
|
21
|
+
fs.writeFile(appTemplateInstance.name, appTemplateInstance.body, err => {
|
|
22
|
+
if (err) {
|
|
23
|
+
return console.error(`Autsch! Failed to store template: ${err.message}.`);
|
|
24
|
+
}
|
|
25
|
+
logger.info("Saved template!");
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
done:function (){
|
|
30
|
+
var appTemplateInstance = this;
|
|
31
|
+
const source = appTemplateInstance.template;
|
|
32
|
+
|
|
33
|
+
(New(Component, {
|
|
34
|
+
name: "static_source",
|
|
35
|
+
template: source,
|
|
36
|
+
cached:false,
|
|
37
|
+
tplsource: "inline",
|
|
38
|
+
data: {
|
|
39
|
+
title: "QCObjects"
|
|
40
|
+
},
|
|
41
|
+
done ({request, component}) {
|
|
42
|
+
appTemplateInstance.body = component.parsedAssignmentText;
|
|
43
|
+
return Promise.resolve({request, component});
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
|
|
47
|
+
if (appTemplateInstance.compileAndSave){
|
|
48
|
+
appTemplateInstance.save();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
},
|
|
52
|
+
_new_:function (){
|
|
53
|
+
|
|
54
|
+
var appTemplateInstance = this;
|
|
55
|
+
const absolutePath = path.resolve( __dirname, "./" );
|
|
56
|
+
|
|
57
|
+
fs.readFile(absolutePath+"/"+appTemplateInstance.templateURI, function(err, data) {
|
|
58
|
+
appTemplateInstance.template = data.toString();
|
|
59
|
+
appTemplateInstance.done.call(appTemplateInstance);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
logger.info("App Template Manager Initialized");
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
]);
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QCObjects Framework
|
|
3
|
+
* ____________________________________
|
|
4
|
+
*
|
|
5
|
+
* Author: Jean Machuca <correojean@gmail.com>
|
|
6
|
+
*
|
|
7
|
+
* Cross Browser Javascript Framework for MVC Patterns
|
|
8
|
+
* QuickCorp/QCObjects is licensed under the
|
|
9
|
+
* GNU Lesser General Public License v3.0
|
|
10
|
+
* [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)
|
|
11
|
+
*
|
|
12
|
+
* Permissions of this copyleft license are conditioned on making available
|
|
13
|
+
* complete source code of licensed works and modifications under the same
|
|
14
|
+
* license or the GNU GPLv3. Copyright and license notices must be preserved.
|
|
15
|
+
* Contributors provide an express grant of patent rights. However, a larger
|
|
16
|
+
* work using the licensed work through interfaces provided by the licensed
|
|
17
|
+
* work may be distributed under different terms and without source code for
|
|
18
|
+
* the larger work.
|
|
19
|
+
*
|
|
20
|
+
* Copyright (C) 2015 Jean Machuca,<correojean@gmail.com>
|
|
21
|
+
*
|
|
22
|
+
* Everyone is permitted to copy and distribute verbatim copies of this
|
|
23
|
+
* license document, but changing it is not allowed.
|
|
24
|
+
*/
|
|
25
|
+
"use strict";
|
|
26
|
+
// eslint-disable-next-line no-undef
|
|
27
|
+
|
|
28
|
+
/* eslint-disable no-undef */
|
|
29
|
+
// This is the service worker with the combined offline experience (Offline page + Offline copy of pages)
|
|
30
|
+
|
|
31
|
+
const CACHE = "{{appName}}-offline-page";
|
|
32
|
+
|
|
33
|
+
importScripts("https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js");
|
|
34
|
+
|
|
35
|
+
const offlineFallbackPage = "index-fallback.html";
|
|
36
|
+
|
|
37
|
+
self.addEventListener("message", (event) => {
|
|
38
|
+
if (event.data && event.data.type === "SKIP_WAITING") {
|
|
39
|
+
self.skipWaiting();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
self.addEventListener("install", async (event) => {
|
|
44
|
+
event.waitUntil(
|
|
45
|
+
caches.open(CACHE)
|
|
46
|
+
.then((cache) => cache.add(offlineFallbackPage))
|
|
47
|
+
);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
if (workbox.navigationPreload.isSupported()) {
|
|
51
|
+
workbox.navigationPreload.enable();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
workbox.routing.registerRoute(
|
|
55
|
+
// eslint-disable-next-line prefer-regex-literals
|
|
56
|
+
new RegExp("/*"),
|
|
57
|
+
new workbox.strategies.StaleWhileRevalidate({
|
|
58
|
+
cacheName: CACHE
|
|
59
|
+
})
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
self.addEventListener("fetch", (event) => {
|
|
63
|
+
if (event.request.mode === "navigate") {
|
|
64
|
+
event.respondWith((async () => {
|
|
65
|
+
try {
|
|
66
|
+
const preloadResp = await event.preloadResponse;
|
|
67
|
+
|
|
68
|
+
if (preloadResp) {
|
|
69
|
+
return preloadResp;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const networkResp = await fetch(event.request);
|
|
73
|
+
return networkResp;
|
|
74
|
+
} catch (error) {
|
|
75
|
+
|
|
76
|
+
const cache = await caches.open(CACHE);
|
|
77
|
+
const cachedResp = await cache.match(offlineFallbackPage);
|
|
78
|
+
return cachedResp;
|
|
79
|
+
}
|
|
80
|
+
})());
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
const version = "{{appVersion}}";
|
|
86
|
+
const appName = "{{appName}}";
|
|
87
|
+
const cacheSufix = (Math.round(Date.now()/(1000*3600))).toString(); // 1 hour
|
|
88
|
+
const cacheName = `qcobjects-app-${appName}-${version}-${cacheSufix}`;
|
|
89
|
+
const startUrl = "/?homescreen=1";
|
|
90
|
+
caches.delete(cacheName); // force to reload cache for the first time the sw is loaded
|
|
91
|
+
self.addEventListener("install", e => {
|
|
92
|
+
e.waitUntil(
|
|
93
|
+
caches.open(cacheName).then(cache => {
|
|
94
|
+
return cache.addAll([`${startUrl}`,{{filelist}}])
|
|
95
|
+
.then(() => self.skipWaiting());
|
|
96
|
+
})
|
|
97
|
+
);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
self.addEventListener("activate", event => {
|
|
101
|
+
event.waitUntil(self.clients.claim());
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
self.addEventListener("fetch", event => {
|
|
105
|
+
event.respondWith(
|
|
106
|
+
caches.open(cacheName)
|
|
107
|
+
.then(cache => cache.match(event.request, { ignoreSearch: true }))
|
|
108
|
+
.then(response => {
|
|
109
|
+
return response || fetch(event.request);
|
|
110
|
+
})
|
|
111
|
+
);
|
|
112
|
+
});
|
package/public/index.d.ts
CHANGED
|
@@ -1,11 +1,139 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
declare module "com.qcobjects.cli.commands.jira.client_services" {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
declare module "com.qcobjects.cli.commands.jira.client_services" {
|
|
3
|
+
const Service: any;
|
|
4
|
+
export class JiraCloud extends Service {
|
|
5
|
+
static [x: string]: any;
|
|
6
|
+
constructor({ name, external, useHTTP2, cached, method, headers, basePath, url, withCredentials }: {
|
|
7
|
+
name?: string | undefined;
|
|
8
|
+
external?: boolean | undefined;
|
|
9
|
+
useHTTP2?: boolean | undefined;
|
|
10
|
+
cached?: boolean | undefined;
|
|
11
|
+
method?: string | undefined;
|
|
12
|
+
headers?: {
|
|
13
|
+
accept: string;
|
|
14
|
+
"content-type": string;
|
|
15
|
+
} | undefined;
|
|
16
|
+
basePath?: string | undefined;
|
|
17
|
+
url?: string | undefined;
|
|
18
|
+
withCredentials?: boolean | undefined;
|
|
19
|
+
});
|
|
20
|
+
done(service: any, standardResponse: any): void;
|
|
21
|
+
fail(e: any): void;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
declare module "com.qcobjects.cli.commands.jira" {
|
|
25
|
+
const InheritClass: any;
|
|
26
|
+
export class CommandHandler extends InheritClass {
|
|
27
|
+
static [x: string]: any;
|
|
28
|
+
constructor({ switchCommander }: {
|
|
29
|
+
switchCommander: any;
|
|
30
|
+
});
|
|
31
|
+
getIssueList(): Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
declare module "com.qcobjects.cli.commands.version" {
|
|
35
|
+
const InheritClass: any;
|
|
36
|
+
export class CommandHandler extends InheritClass {
|
|
37
|
+
static [x: string]: any;
|
|
38
|
+
constructor({ switchCommander }: {
|
|
39
|
+
switchCommander: any;
|
|
40
|
+
});
|
|
41
|
+
syncGit(versionString: any, commitMsg: any, syncNpm?: boolean): void;
|
|
42
|
+
parseVersionString(versionString: string): {
|
|
43
|
+
major: string;
|
|
44
|
+
minor: string;
|
|
45
|
+
patch: string;
|
|
46
|
+
};
|
|
47
|
+
getVersionStringFromFile(filename: any): any;
|
|
48
|
+
buildNewSemVersionString({ major, minor, patch }: {
|
|
49
|
+
major: string;
|
|
50
|
+
minor: string;
|
|
51
|
+
patch: string;
|
|
52
|
+
}): string;
|
|
53
|
+
parseVersionSuffix(versionString: string): string;
|
|
54
|
+
buildNewVersionString({ major, minor, patch }: any, suffix: any): string;
|
|
55
|
+
saveNewVersionFile(filename: any, versionString: any): void;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
declare module "com.qcobjects.cli.commands" {
|
|
59
|
+
export * as versionCommand from "com.qcobjects.cli.commands.version";
|
|
60
|
+
export * as jiraCommand from "com.qcobjects.cli.commands.jira";
|
|
61
|
+
}
|
|
62
|
+
declare module "org.quickcorp.qcobjects.defaultsettings" {
|
|
63
|
+
export const __get_version__: () => {
|
|
64
|
+
qcobjects: any;
|
|
65
|
+
sdk: any;
|
|
66
|
+
cli: any;
|
|
67
|
+
};
|
|
68
|
+
export const __get_version_string__: () => string;
|
|
69
|
+
}
|
|
70
|
+
declare module "org.qcobjects.enterprise.commands" {
|
|
71
|
+
const InheritClass: any;
|
|
72
|
+
export class QCObjectsEnterprise extends InheritClass {
|
|
73
|
+
static [x: string]: any;
|
|
74
|
+
install(): void;
|
|
75
|
+
upgrade(switchCommander: any): void;
|
|
76
|
+
installEnterprise(license: string | any[], email: any): void;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
declare module "org.quickcorp.qcobjects.api.client_services" {
|
|
80
|
+
const Service: any;
|
|
81
|
+
export class QuickCorpCloud extends Service {
|
|
82
|
+
static [x: string]: any;
|
|
83
|
+
constructor({ name, external, useHTTP2, cached, method, headers, basePath, url, withCredentials }: {
|
|
84
|
+
name?: string | undefined;
|
|
85
|
+
external?: boolean | undefined;
|
|
86
|
+
useHTTP2?: boolean | undefined;
|
|
87
|
+
cached?: boolean | undefined;
|
|
88
|
+
method?: string | undefined;
|
|
89
|
+
headers?: {
|
|
90
|
+
origin: string;
|
|
91
|
+
"content-type": string;
|
|
92
|
+
} | undefined;
|
|
93
|
+
basePath?: string | undefined;
|
|
94
|
+
url?: string | undefined;
|
|
95
|
+
withCredentials?: boolean | undefined;
|
|
96
|
+
});
|
|
97
|
+
_new_(o: any): void;
|
|
98
|
+
done(service: any, standardResponse: any): void;
|
|
99
|
+
fail(e: any): void;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
declare module "org.quickcorp.qcobjects.cli" {
|
|
103
|
+
const InheritClass: any;
|
|
104
|
+
export * as EnterpriseCommands from "org.qcobjects.enterprise.commands";
|
|
105
|
+
export * as QuickCorpServices from "org.quickcorp.qcobjects.api.client_services";
|
|
106
|
+
export * as customCommands from "com.qcobjects.cli.commands";
|
|
107
|
+
export const getPluginCommandsList: () => any;
|
|
108
|
+
export class SwitchCommander extends InheritClass {
|
|
109
|
+
static [x: string]: any;
|
|
110
|
+
choiceOption: {
|
|
111
|
+
generateSw: (_appName: boolean, options: {
|
|
112
|
+
dir: any;
|
|
113
|
+
}) => void;
|
|
114
|
+
create: (_appName: boolean, options: {
|
|
115
|
+
createAmp: any;
|
|
116
|
+
createPwa: any;
|
|
117
|
+
createPhp: any;
|
|
118
|
+
createCustom: any;
|
|
119
|
+
}) => void;
|
|
120
|
+
publish(_appName: any, _options: any): void;
|
|
121
|
+
upgradeToEnterprise(_appName: any, _options: any): void;
|
|
122
|
+
};
|
|
123
|
+
constructor();
|
|
124
|
+
shellCommands(_shell_commands: any[]): Promise<unknown>;
|
|
125
|
+
fileListRecursive(dir: string): string | any[];
|
|
126
|
+
register(email: any, phonenumber: any): Promise<unknown>;
|
|
127
|
+
generateServiceWorker(appName: any, dirPrefix?: string): Promise<unknown>;
|
|
128
|
+
copyTemplate(source: any, dest: any): Promise<void>;
|
|
129
|
+
initCommand(): void;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
6
132
|
declare module "qcobjects-cli" {
|
|
7
133
|
const InheritClass: any;
|
|
8
|
-
|
|
134
|
+
export * as defaultSettings from "org.quickcorp.qcobjects.defaultsettings";
|
|
135
|
+
export class Main extends InheritClass {
|
|
136
|
+
static [x: string]: any;
|
|
9
137
|
constructor();
|
|
10
138
|
}
|
|
11
139
|
const __main__: Main;
|
|
@@ -15,12 +143,14 @@ declare module "index" {
|
|
|
15
143
|
import * as cli from "qcobjects-cli";
|
|
16
144
|
export default cli;
|
|
17
145
|
}
|
|
18
|
-
declare module "org.qcobjects.common.pipelog" {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
146
|
+
declare module "org.qcobjects.common.pipelog" {
|
|
147
|
+
const InheritClass: any;
|
|
148
|
+
export class PipeLog extends InheritClass {
|
|
149
|
+
static [x: string]: any;
|
|
150
|
+
pipe(o: any): string;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
22
153
|
declare module "org.quickcorp.qcobjects.collab.server" { }
|
|
23
|
-
declare module "org.quickcorp.qcobjects.defaultsettings" { }
|
|
24
154
|
declare module "org.quickcorp.qcobjects.main.file" { }
|
|
25
155
|
declare module "org.quickcorp.qcobjects.main.http.gae.server" { }
|
|
26
156
|
declare module "org.quickcorp.qcobjects.main.http.server" { }
|
|
@@ -30,23 +30,23 @@
|
|
|
30
30
|
/*eslint no-undef: "off"*/
|
|
31
31
|
"use strict";
|
|
32
32
|
|
|
33
|
-
const {Package, Service, logger} = require
|
|
33
|
+
const { Package, Service, logger } = require("qcobjects");
|
|
34
34
|
|
|
35
|
-
class JiraCloud extends Service {
|
|
36
|
-
constructor
|
|
37
|
-
name= "jira_cloud",
|
|
38
|
-
external= true,
|
|
39
|
-
useHTTP2= true,
|
|
40
|
-
cached= false,
|
|
41
|
-
method= "POST",
|
|
42
|
-
headers= {
|
|
43
|
-
"accept":"application/json",
|
|
44
|
-
"content-type":"application/json"
|
|
35
|
+
export class JiraCloud extends Service {
|
|
36
|
+
constructor({
|
|
37
|
+
name = "jira_cloud",
|
|
38
|
+
external = true,
|
|
39
|
+
useHTTP2 = true,
|
|
40
|
+
cached = false,
|
|
41
|
+
method = "POST",
|
|
42
|
+
headers = {
|
|
43
|
+
"accept": "application/json",
|
|
44
|
+
"content-type": "application/json"
|
|
45
45
|
},
|
|
46
|
-
basePath= "",
|
|
47
|
-
url= "",
|
|
48
|
-
withCredentials= false
|
|
49
|
-
}){
|
|
46
|
+
basePath = "",
|
|
47
|
+
url = "",
|
|
48
|
+
withCredentials = false
|
|
49
|
+
}) {
|
|
50
50
|
super({
|
|
51
51
|
name,
|
|
52
52
|
external,
|
|
@@ -68,19 +68,17 @@ class JiraCloud extends Service {
|
|
|
68
68
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
done(service: any,standardResponse: any) {
|
|
71
|
+
done(service: any, standardResponse: any) {
|
|
72
72
|
// service loaded
|
|
73
73
|
logger.debug(standardResponse);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
fail
|
|
77
|
-
|
|
76
|
+
fail(e: any) {
|
|
77
|
+
logger.debug(e);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
Package("com.qcobjects.cli.commands.jira.client_services", [
|
|
83
|
-
JiraCloud
|
|
83
|
+
JiraCloud
|
|
84
84
|
]);
|
|
85
|
-
|
|
86
|
-
exports = {JiraCloud};
|
|
@@ -29,32 +29,28 @@
|
|
|
29
29
|
/*eslint no-mixed-operators: "off"*/
|
|
30
30
|
/*eslint no-undef: "off"*/
|
|
31
31
|
"use strict";
|
|
32
|
-
const fs = require("fs");
|
|
33
32
|
const path = require("path");
|
|
34
33
|
const absolutePath = path.resolve(__dirname, "./");
|
|
35
|
-
const templatePath = path.resolve(__dirname, "./templates/apps/") + "/";
|
|
36
|
-
const templatePwaPath = path.resolve(__dirname, "./templates/pwa/") + "/";
|
|
37
|
-
const package_config = require(absolutePath + "/../package.json");
|
|
38
34
|
const {
|
|
39
35
|
exec,
|
|
40
36
|
execSync
|
|
41
37
|
} = require("child_process");
|
|
42
38
|
|
|
43
|
-
const {Package, InheritClass, _DataStringify, New, CONFIG, logger, serviceLoader} = require("qcobjects");
|
|
39
|
+
const { Package, InheritClass, _DataStringify, New, CONFIG, logger, serviceLoader } = require("qcobjects");
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
import { JiraCloud } from "./com.qcobjects.cli.commands.jira.client_services";
|
|
46
42
|
|
|
47
|
-
class CommandHandler extends InheritClass {
|
|
43
|
+
export class CommandHandler extends InheritClass {
|
|
48
44
|
constructor({
|
|
49
45
|
switchCommander
|
|
50
|
-
}:{switchCommander:any}) {
|
|
51
|
-
super({switchCommander});
|
|
46
|
+
}: { switchCommander: any }) {
|
|
47
|
+
super({ switchCommander });
|
|
52
48
|
this.choiceOption = {
|
|
53
|
-
issues: function (
|
|
49
|
+
issues: function () {
|
|
54
50
|
|
|
55
|
-
this.getIssueList().then(function (response:any) {
|
|
51
|
+
this.getIssueList().then(function (response: any) {
|
|
56
52
|
console.log(_DataStringify(response));
|
|
57
|
-
}).catch((e:any) => {
|
|
53
|
+
}).catch((e: any) => {
|
|
58
54
|
console.log(e);
|
|
59
55
|
process.exit(1);
|
|
60
56
|
});
|
|
@@ -82,13 +78,9 @@ class CommandHandler extends InheritClass {
|
|
|
82
78
|
}
|
|
83
79
|
});
|
|
84
80
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
81
|
}
|
|
90
82
|
|
|
91
|
-
getIssueList(
|
|
83
|
+
getIssueList() {
|
|
92
84
|
return new Promise<void>(function (resolve, reject) {
|
|
93
85
|
logger.info("I'm going to get the issue list from the jira cloud...");
|
|
94
86
|
const jira_config = CONFIG.get("jira", null);
|
|
@@ -111,20 +103,6 @@ class CommandHandler extends InheritClass {
|
|
|
111
103
|
}
|
|
112
104
|
});
|
|
113
105
|
try {
|
|
114
|
-
const service = serviceLoader(cloudClient).then((successResponse: { service: { template: any; }; responseHeaders: any; }) => {
|
|
115
|
-
const template = successResponse.service.template;
|
|
116
|
-
const responseHeaders = successResponse.responseHeaders;
|
|
117
|
-
if (responseHeaders[":status"] === 200 || !cloudClient.useHTTP2) {
|
|
118
|
-
const response = JSON.parse(template);
|
|
119
|
-
resolve(response);
|
|
120
|
-
} else {
|
|
121
|
-
console.error("\u{1F926} Something went wrong \u{1F926} when trying to get jira issues from the cloud. The status was: " + responseHeaders[":status"]);
|
|
122
|
-
reject(template as Error);
|
|
123
|
-
}
|
|
124
|
-
}).catch((e: any) => {
|
|
125
|
-
console.error("\u{1F926} Something went wrong \u{1F926} when trying to get jira issues from the cloud");
|
|
126
|
-
reject(e as Error);
|
|
127
|
-
});
|
|
128
106
|
} catch (e) {
|
|
129
107
|
console.error("\u{1F926} Something went wrong \u{1F926} when trying to get jira issues from the cloud");
|
|
130
108
|
reject(e as Error);
|
|
@@ -132,7 +110,7 @@ class CommandHandler extends InheritClass {
|
|
|
132
110
|
|
|
133
111
|
} else {
|
|
134
112
|
console.error("\u{1F926} Something went wrong \u{1F926} You need to set the jira config settings");
|
|
135
|
-
reject(new Error
|
|
113
|
+
reject(new Error("\u{1F926} Something went wrong \u{1F926} You need to set the jira config settings"));
|
|
136
114
|
}
|
|
137
115
|
|
|
138
116
|
});
|
|
@@ -142,6 +120,5 @@ class CommandHandler extends InheritClass {
|
|
|
142
120
|
}
|
|
143
121
|
|
|
144
122
|
Package("com.qcobjects.cli.commands.jira", [
|
|
145
|
-
|
|
146
|
-
CommandHandler
|
|
123
|
+
CommandHandler
|
|
147
124
|
]);
|
|
@@ -29,14 +29,8 @@
|
|
|
29
29
|
/*eslint no-mixed-operators: "off"*/
|
|
30
30
|
/*eslint no-undef: "off"*/
|
|
31
31
|
"use strict";
|
|
32
|
-
const fs = require("fs");
|
|
33
|
-
const path = require("path");
|
|
34
|
-
const absolutePath = path.resolve( __dirname, "./" );
|
|
35
|
-
const templatePath = path.resolve( __dirname, "./templates/apps/" )+"/";
|
|
36
|
-
const templatePwaPath = path.resolve( __dirname, "./templates/pwa/" )+"/";
|
|
37
|
-
const package_config = require(absolutePath+"/../package.json");
|
|
38
|
-
const { exec,execSync } = require("child_process");
|
|
39
32
|
|
|
40
33
|
// plugin commands here
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
|
|
35
|
+
export * as versionCommand from "./com.qcobjects.cli.commands.version";
|
|
36
|
+
export * as jiraCommand from "./com.qcobjects.cli.commands.jira";
|
|
@@ -31,15 +31,11 @@
|
|
|
31
31
|
"use strict";
|
|
32
32
|
const fs = require("fs");
|
|
33
33
|
const path = require("path");
|
|
34
|
-
const absolutePath = path.resolve(__dirname, "./");
|
|
35
|
-
const templatePath = path.resolve(__dirname, "./templates/apps/") + "/";
|
|
36
|
-
const templatePwaPath = path.resolve(__dirname, "./templates/pwa/") + "/";
|
|
37
|
-
const package_config = require(absolutePath + "/../package.json");
|
|
38
34
|
const { exec, execSync } = require("child_process");
|
|
39
35
|
|
|
40
36
|
const { Package, InheritClass, logger } = require("qcobjects");
|
|
41
37
|
|
|
42
|
-
class CommandHandler extends InheritClass {
|
|
38
|
+
export class CommandHandler extends InheritClass {
|
|
43
39
|
|
|
44
40
|
constructor({ switchCommander }: { switchCommander: any }) {
|
|
45
41
|
super({ switchCommander });
|
|
@@ -140,7 +136,6 @@ class CommandHandler extends InheritClass {
|
|
|
140
136
|
}
|
|
141
137
|
);
|
|
142
138
|
var minorVersionTags = versionTags.filter((tag: { version: string; }) => tag.version !== "").map((tag: { version: string; }) => tag.version.split(".")[0] + "." + tag.version.split(".")[1]).unique();
|
|
143
|
-
var majorVersionTags = versionTags.filter((tag: { version: string; }) => tag.version !== "").map((tag: { version: string; }) => tag.version.split(".")[0]).unique();
|
|
144
139
|
var history = minorVersionTags.map((minor: string) => {
|
|
145
140
|
return {
|
|
146
141
|
"major": minor.split(".")[0],
|
|
@@ -286,8 +281,5 @@ class CommandHandler extends InheritClass {
|
|
|
286
281
|
|
|
287
282
|
|
|
288
283
|
Package("com.qcobjects.cli.commands.version", [
|
|
289
|
-
|
|
290
284
|
CommandHandler
|
|
291
285
|
]);
|
|
292
|
-
|
|
293
|
-
exports = {CommandHandler};
|
|
@@ -32,24 +32,27 @@
|
|
|
32
32
|
|
|
33
33
|
const {Package, InheritClass} = require("qcobjects");
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
class PipeLog extends InheritClass {
|
|
35
|
+
export class PipeLog extends InheritClass {
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
37
|
+
pipe(o:any) {
|
|
38
|
+
var _o = [];
|
|
39
|
+
for (var k in o) {
|
|
40
|
+
if (typeof o[k] !== "undefined" &&
|
|
41
|
+
o[k] !== null &&
|
|
42
|
+
typeof o[k] !== "function") {
|
|
43
|
+
try {
|
|
44
|
+
_o.push("" + k + "=" + o[k].toString());
|
|
45
|
+
} catch (e) {
|
|
46
|
+
// error logging, do nothing
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
|
-
return _o.join(" ");
|
|
52
49
|
}
|
|
53
|
-
|
|
50
|
+
return _o.join(" ");
|
|
54
51
|
}
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
Package("org.qcobjects.common.pipelog", [
|
|
57
|
+
PipeLog
|
|
55
58
|
]);
|