@heroku-cli/plugin-devcenter 0.0.1 → 2.0.0
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/LICENSE.txt +22 -0
- package/README.md +132 -17
- package/dist/commands/devcenter/open.d.ts +9 -0
- package/dist/commands/devcenter/open.d.ts.map +1 -0
- package/dist/commands/devcenter/open.js +33 -0
- package/dist/commands/devcenter/open.js.map +1 -0
- package/dist/commands/devcenter/preview.d.ts +14 -0
- package/dist/commands/devcenter/preview.d.ts.map +1 -0
- package/dist/commands/devcenter/preview.js +40 -0
- package/dist/commands/devcenter/preview.js.map +1 -0
- package/dist/commands/devcenter/pull.d.ts +12 -0
- package/dist/commands/devcenter/pull.d.ts.map +1 -0
- package/dist/commands/devcenter/pull.js +52 -0
- package/dist/commands/devcenter/pull.js.map +1 -0
- package/dist/commands/devcenter/push.d.ts +9 -0
- package/dist/commands/devcenter/push.d.ts.map +1 -0
- package/dist/commands/devcenter/push.js +105 -0
- package/dist/commands/devcenter/push.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/article-file.d.ts +21 -0
- package/dist/lib/article-file.d.ts.map +1 -0
- package/dist/lib/article-file.js +48 -0
- package/dist/lib/article-file.js.map +1 -0
- package/dist/lib/article-not-found.d.ts +3 -0
- package/dist/lib/article-not-found.d.ts.map +1 -0
- package/dist/lib/article-not-found.js +16 -0
- package/dist/lib/article-not-found.js.map +1 -0
- package/dist/lib/article-resolve.d.ts +23 -0
- package/dist/lib/article-resolve.d.ts.map +1 -0
- package/dist/lib/article-resolve.js +61 -0
- package/dist/lib/article-resolve.js.map +1 -0
- package/dist/lib/article-split.d.ts +9 -0
- package/dist/lib/article-split.d.ts.map +1 -0
- package/dist/lib/article-split.js +15 -0
- package/dist/lib/article-split.js.map +1 -0
- package/dist/lib/devcenter-client.d.ts +39 -0
- package/dist/lib/devcenter-client.d.ts.map +1 -0
- package/dist/lib/devcenter-client.js +119 -0
- package/dist/lib/devcenter-client.js.map +1 -0
- package/dist/lib/heroku-api-auth.d.ts +7 -0
- package/dist/lib/heroku-api-auth.d.ts.map +1 -0
- package/dist/lib/heroku-api-auth.js +12 -0
- package/dist/lib/heroku-api-auth.js.map +1 -0
- package/dist/lib/paths.d.ts +18 -0
- package/dist/lib/paths.d.ts.map +1 -0
- package/dist/lib/paths.js +48 -0
- package/dist/lib/paths.js.map +1 -0
- package/dist/lib/preview-server.d.ts +17 -0
- package/dist/lib/preview-server.d.ts.map +1 -0
- package/dist/lib/preview-server.js +94 -0
- package/dist/lib/preview-server.js.map +1 -0
- package/dist/lib/preview-templates.d.ts +7 -0
- package/dist/lib/preview-templates.d.ts.map +1 -0
- package/dist/lib/preview-templates.js +93 -0
- package/dist/lib/preview-templates.js.map +1 -0
- package/oclif.manifest.json +172 -1
- package/package.json +86 -47
- package/lib/commands/docs.d.ts +0 -25
- package/lib/commands/docs.js +0 -29
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -3
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
function esc(s) {
|
|
2
|
+
return s
|
|
3
|
+
.replaceAll('&', '&')
|
|
4
|
+
.replaceAll('<', '<')
|
|
5
|
+
.replaceAll('>', '>')
|
|
6
|
+
.replaceAll('"', '"');
|
|
7
|
+
}
|
|
8
|
+
const PREVIEW_CSS = `
|
|
9
|
+
body { font-family: system-ui, -apple-system, sans-serif; margin: 0; line-height: 1.5; color: #1b1b1b; }
|
|
10
|
+
.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
|
|
11
|
+
header { background: linear-gradient(135deg, #79589f 0%, #4b2866 100%); color: #fff; padding: 0.75rem 0; }
|
|
12
|
+
.heroku-header .container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; display: flex; align-items: center; gap: 1rem; }
|
|
13
|
+
.heroku-brand { color: #fff; font-weight: 600; text-decoration: none; }
|
|
14
|
+
.nav { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }
|
|
15
|
+
.nav a { color: #e8e0f0; text-decoration: none; }
|
|
16
|
+
.container { max-width: 1200px; margin: 0 auto; padding: 1rem; }
|
|
17
|
+
.content { max-width: 48rem; }
|
|
18
|
+
footer { margin-top: auto; border-top: 1px solid #e5e5e5; padding: 1rem 0; font-size: 0.875rem; }
|
|
19
|
+
footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }
|
|
20
|
+
.warning { background: #fff3cd; border: 1px solid #ffc107; padding: 1rem; border-radius: 4px; }
|
|
21
|
+
#table-of-contents { margin-bottom: 1.5rem; }
|
|
22
|
+
pre { background: #f5f5f5; padding: 1rem; overflow: auto; border-radius: 4px; }
|
|
23
|
+
code { background: #f5f5f5; padding: 0.15em 0.35em; border-radius: 3px; font-size: 0.9em; }
|
|
24
|
+
.last-updated { color: #666; font-size: 0.9rem; }
|
|
25
|
+
`;
|
|
26
|
+
export function renderPreviewPage(article, slug) {
|
|
27
|
+
const title = article.metadata.title || slug;
|
|
28
|
+
let inner;
|
|
29
|
+
if (article.html) {
|
|
30
|
+
const tocItems = article.toc
|
|
31
|
+
.map(s => `<li><a href="#${esc(s.id)}">${esc(s.text)}</a></li>`)
|
|
32
|
+
.join('');
|
|
33
|
+
const tocBlock = tocItems.length > 0
|
|
34
|
+
? `<div id="table-of-contents"><h3>Table of Contents</h3><ul>${tocItems}</ul></div>`
|
|
35
|
+
: '';
|
|
36
|
+
inner = `
|
|
37
|
+
<article class="js-autolink">
|
|
38
|
+
<h1>${esc(article.metadata.title)}</h1>
|
|
39
|
+
<p class="last-updated">Last updated (local preview)</p>
|
|
40
|
+
${tocBlock}
|
|
41
|
+
${article.html}
|
|
42
|
+
</article>`;
|
|
43
|
+
}
|
|
44
|
+
else if (article.parsingError) {
|
|
45
|
+
inner = `<article><div class="warning"><p>Parsing error: ${esc(article.parsingError)}</p></div></article>`;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
inner = '<article><p>No content.</p></article>';
|
|
49
|
+
}
|
|
50
|
+
const html = `<!DOCTYPE html>
|
|
51
|
+
<html lang="en">
|
|
52
|
+
<head>
|
|
53
|
+
<meta charset="utf-8">
|
|
54
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
55
|
+
<title>Preview: ${esc(title)}</title>
|
|
56
|
+
<style>${PREVIEW_CSS}</style>
|
|
57
|
+
<script>
|
|
58
|
+
try {
|
|
59
|
+
var es = new EventSource('/stream');
|
|
60
|
+
es.onmessage = function() { document.location.reload(); };
|
|
61
|
+
es.onerror = function() { es.close(); };
|
|
62
|
+
} catch (e) { console.error(e); }
|
|
63
|
+
</script>
|
|
64
|
+
</head>
|
|
65
|
+
<body>
|
|
66
|
+
<div class="page-wrapper">
|
|
67
|
+
<header><div class="heroku-header"><div class="container">
|
|
68
|
+
<span class="heroku-brand">Heroku Dev Center</span>
|
|
69
|
+
<ul class="nav"><li><a href="#">Local Preview</a></li></ul>
|
|
70
|
+
</div></div></header>
|
|
71
|
+
<div class="container"><div class="content">${inner}</div></div>
|
|
72
|
+
<footer><div class="container"><ul>
|
|
73
|
+
<li><a href="https://www.heroku.com/home">heroku.com</a></li>
|
|
74
|
+
<li><a href="https://www.heroku.com/policy/privacy">Privacy Policy</a></li>
|
|
75
|
+
</ul></div></footer>
|
|
76
|
+
</div>
|
|
77
|
+
</body>
|
|
78
|
+
</html>`;
|
|
79
|
+
return { html, title };
|
|
80
|
+
}
|
|
81
|
+
export function renderNotFoundPage(referrerUrl) {
|
|
82
|
+
const back = referrerUrl
|
|
83
|
+
? `<a href="${esc(referrerUrl)}">Return to your article</a>.`
|
|
84
|
+
: '';
|
|
85
|
+
return `<!DOCTYPE html>
|
|
86
|
+
<html lang="en"><head><meta charset="utf-8"><title>Not found</title><style>${PREVIEW_CSS}</style></head>
|
|
87
|
+
<body><div class="container content">
|
|
88
|
+
<article><h1>Ooops</h1><div class="warning"><p>
|
|
89
|
+
You clicked a relative link for a URL not available locally. ${back}
|
|
90
|
+
</p></div></article>
|
|
91
|
+
</div></body></html>`;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=preview-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-templates.js","sourceRoot":"","sources":["../../src/lib/preview-templates.ts"],"names":[],"mappings":"AAEA,SAAS,GAAG,CAAC,CAAS;IACpB,OAAO,CAAC;SACL,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;SACxB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;AAC9B,CAAC;AAED,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;CAiBnB,CAAA;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAoB,EAAE,IAAY;IAClE,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,IAAI,CAAA;IAC5C,IAAI,KAAa,CAAA;IACjB,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG;aACzB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,iBAAiB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;aAC/D,IAAI,CAAC,EAAE,CAAC,CAAA;QACX,MAAM,QAAQ,GACV,QAAQ,CAAC,MAAM,GAAG,CAAC;YACnB,CAAC,CAAC,6DAA6D,QAAQ,aAAa;YACpF,CAAC,CAAC,EAAE,CAAA;QACR,KAAK,GAAG;;QAEJ,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;;IAE/B,QAAQ;IACR,OAAO,CAAC,IAAI;WACL,CAAA;IACT,CAAC;SAAM,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;QAChC,KAAK,GAAG,mDAAmD,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,sBAAsB,CAAA;IAC5G,CAAC;SAAM,CAAC;QACN,KAAK,GAAG,uCAAuC,CAAA;IACjD,CAAC;IAED,MAAM,IAAI,GAAG;;;;;oBAKK,GAAG,CAAC,KAAK,CAAC;WACnB,WAAW;;;;;;;;;;;;;;;kDAe4B,KAAK;;;;;;;QAO/C,CAAA;IACN,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,CAAA;AACtB,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,WAAoB;IACrD,MAAM,IAAI,GACN,WAAW;QACX,CAAC,CAAC,YAAY,GAAG,CAAC,WAAW,CAAC,+BAA+B;QAC7D,CAAC,CAAC,EAAE,CAAA;IACR,OAAO;6EACoE,WAAW;;;+DAGzB,IAAI;;qBAE9C,CAAA;AACrB,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1,172 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"commands": {
|
|
3
|
+
"devcenter:open": {
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"args": {
|
|
6
|
+
"slug": {
|
|
7
|
+
"description": "article slug (e.g. ps for https://devcenter.heroku.com/articles/ps)",
|
|
8
|
+
"name": "slug",
|
|
9
|
+
"required": true
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"description": "open a Dev Center article in the browser (uses Heroku credentials for private or draft content when available)",
|
|
13
|
+
"flags": {
|
|
14
|
+
"prompt": {
|
|
15
|
+
"description": "interactively prompt for command arguments and flags",
|
|
16
|
+
"helpGroup": "GLOBAL",
|
|
17
|
+
"name": "prompt",
|
|
18
|
+
"allowNo": false,
|
|
19
|
+
"type": "boolean"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"hasDynamicHelp": false,
|
|
23
|
+
"hiddenAliases": [],
|
|
24
|
+
"id": "devcenter:open",
|
|
25
|
+
"pluginAlias": "@heroku-cli/plugin-devcenter",
|
|
26
|
+
"pluginName": "@heroku-cli/plugin-devcenter",
|
|
27
|
+
"pluginType": "core",
|
|
28
|
+
"strict": true,
|
|
29
|
+
"enableJsonFlag": false,
|
|
30
|
+
"promptFlagActive": true,
|
|
31
|
+
"isESM": true,
|
|
32
|
+
"relativePath": [
|
|
33
|
+
"dist",
|
|
34
|
+
"commands",
|
|
35
|
+
"devcenter",
|
|
36
|
+
"open.js"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"devcenter:preview": {
|
|
40
|
+
"aliases": [],
|
|
41
|
+
"args": {
|
|
42
|
+
"slug": {
|
|
43
|
+
"description": "article slug (local <slug>.md file)",
|
|
44
|
+
"name": "slug",
|
|
45
|
+
"required": true
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"description": "preview a local Dev Center article in the browser with live reload",
|
|
49
|
+
"flags": {
|
|
50
|
+
"prompt": {
|
|
51
|
+
"description": "interactively prompt for command arguments and flags",
|
|
52
|
+
"helpGroup": "GLOBAL",
|
|
53
|
+
"name": "prompt",
|
|
54
|
+
"allowNo": false,
|
|
55
|
+
"type": "boolean"
|
|
56
|
+
},
|
|
57
|
+
"host": {
|
|
58
|
+
"description": "bind host for the preview server",
|
|
59
|
+
"name": "host",
|
|
60
|
+
"default": "127.0.0.1",
|
|
61
|
+
"hasDynamicHelp": false,
|
|
62
|
+
"multiple": false,
|
|
63
|
+
"type": "option"
|
|
64
|
+
},
|
|
65
|
+
"port": {
|
|
66
|
+
"description": "port for the preview server",
|
|
67
|
+
"name": "port",
|
|
68
|
+
"default": 3000,
|
|
69
|
+
"hasDynamicHelp": false,
|
|
70
|
+
"multiple": false,
|
|
71
|
+
"type": "option"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"hasDynamicHelp": false,
|
|
75
|
+
"hiddenAliases": [],
|
|
76
|
+
"id": "devcenter:preview",
|
|
77
|
+
"pluginAlias": "@heroku-cli/plugin-devcenter",
|
|
78
|
+
"pluginName": "@heroku-cli/plugin-devcenter",
|
|
79
|
+
"pluginType": "core",
|
|
80
|
+
"strict": true,
|
|
81
|
+
"enableJsonFlag": false,
|
|
82
|
+
"promptFlagActive": true,
|
|
83
|
+
"isESM": true,
|
|
84
|
+
"relativePath": [
|
|
85
|
+
"dist",
|
|
86
|
+
"commands",
|
|
87
|
+
"devcenter",
|
|
88
|
+
"preview.js"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"devcenter:pull": {
|
|
92
|
+
"aliases": [],
|
|
93
|
+
"args": {
|
|
94
|
+
"slugOrUrl": {
|
|
95
|
+
"description": "article slug or full Dev Center article URL",
|
|
96
|
+
"name": "slugOrUrl",
|
|
97
|
+
"required": true
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"description": "save a local copy of a Dev Center article",
|
|
101
|
+
"flags": {
|
|
102
|
+
"prompt": {
|
|
103
|
+
"description": "interactively prompt for command arguments and flags",
|
|
104
|
+
"helpGroup": "GLOBAL",
|
|
105
|
+
"name": "prompt",
|
|
106
|
+
"allowNo": false,
|
|
107
|
+
"type": "boolean"
|
|
108
|
+
},
|
|
109
|
+
"force": {
|
|
110
|
+
"char": "f",
|
|
111
|
+
"description": "overwrite an existing local file without prompting",
|
|
112
|
+
"name": "force",
|
|
113
|
+
"allowNo": false,
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"hasDynamicHelp": false,
|
|
118
|
+
"hiddenAliases": [],
|
|
119
|
+
"id": "devcenter:pull",
|
|
120
|
+
"pluginAlias": "@heroku-cli/plugin-devcenter",
|
|
121
|
+
"pluginName": "@heroku-cli/plugin-devcenter",
|
|
122
|
+
"pluginType": "core",
|
|
123
|
+
"strict": true,
|
|
124
|
+
"enableJsonFlag": false,
|
|
125
|
+
"promptFlagActive": true,
|
|
126
|
+
"isESM": true,
|
|
127
|
+
"relativePath": [
|
|
128
|
+
"dist",
|
|
129
|
+
"commands",
|
|
130
|
+
"devcenter",
|
|
131
|
+
"pull.js"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"devcenter:push": {
|
|
135
|
+
"aliases": [],
|
|
136
|
+
"args": {
|
|
137
|
+
"slug": {
|
|
138
|
+
"description": "article slug (optional .md suffix is ignored)",
|
|
139
|
+
"name": "slug",
|
|
140
|
+
"required": true
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"description": "update a Dev Center article from a local markdown file",
|
|
144
|
+
"flags": {
|
|
145
|
+
"prompt": {
|
|
146
|
+
"description": "interactively prompt for command arguments and flags",
|
|
147
|
+
"helpGroup": "GLOBAL",
|
|
148
|
+
"name": "prompt",
|
|
149
|
+
"allowNo": false,
|
|
150
|
+
"type": "boolean"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"hasDynamicHelp": false,
|
|
154
|
+
"hiddenAliases": [],
|
|
155
|
+
"id": "devcenter:push",
|
|
156
|
+
"pluginAlias": "@heroku-cli/plugin-devcenter",
|
|
157
|
+
"pluginName": "@heroku-cli/plugin-devcenter",
|
|
158
|
+
"pluginType": "core",
|
|
159
|
+
"strict": true,
|
|
160
|
+
"enableJsonFlag": false,
|
|
161
|
+
"promptFlagActive": true,
|
|
162
|
+
"isESM": true,
|
|
163
|
+
"relativePath": [
|
|
164
|
+
"dist",
|
|
165
|
+
"commands",
|
|
166
|
+
"devcenter",
|
|
167
|
+
"push.js"
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"version": "2.0.0"
|
|
172
|
+
}
|
package/package.json
CHANGED
|
@@ -1,60 +1,99 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heroku-cli/plugin-devcenter",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "0.0
|
|
5
|
-
"author": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"opn": "^5.3.0",
|
|
12
|
-
"tslib": "^1"
|
|
13
|
-
},
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"@oclif/dev-cli": "^1",
|
|
16
|
-
"@oclif/plugin-help": "^1",
|
|
17
|
-
"@oclif/test": "^1",
|
|
18
|
-
"@oclif/tslint": "^1",
|
|
19
|
-
"@types/chai": "^4",
|
|
20
|
-
"@types/mocha": "^5",
|
|
21
|
-
"@types/node": "^10",
|
|
22
|
-
"chai": "^4",
|
|
23
|
-
"globby": "^8",
|
|
24
|
-
"mocha": "^5",
|
|
25
|
-
"nyc": "^11",
|
|
26
|
-
"ts-node": "^6",
|
|
27
|
-
"tslint": "^5",
|
|
28
|
-
"typescript": "^2.8"
|
|
29
|
-
},
|
|
30
|
-
"engines": {
|
|
31
|
-
"node": ">=8.0.0"
|
|
3
|
+
"description": "Heroku CLI plugin to interact with Heroku Dev Center",
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"author": "Heroku",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/heroku/devcenter-cli.git"
|
|
32
11
|
},
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
"/oclif.manifest.json"
|
|
36
|
-
],
|
|
37
|
-
"homepage": "https://github.com/heroku/heroku-devcenter-plugin",
|
|
12
|
+
"bugs": "https://github.com/heroku/devcenter-cli/issues",
|
|
13
|
+
"homepage": "https://github.com/heroku/devcenter-cli",
|
|
38
14
|
"keywords": [
|
|
39
|
-
"
|
|
15
|
+
"heroku-plugin",
|
|
16
|
+
"oclif"
|
|
17
|
+
],
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"oclif.manifest.json"
|
|
40
21
|
],
|
|
41
|
-
"
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./dist/index.js",
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"main": "dist/index.js",
|
|
29
|
+
"types": "dist/index.d.ts",
|
|
42
30
|
"oclif": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
31
|
+
"bin": "heroku",
|
|
32
|
+
"commands": "./dist/commands",
|
|
45
33
|
"devPlugins": [
|
|
46
34
|
"@oclif/plugin-help"
|
|
47
|
-
]
|
|
35
|
+
],
|
|
36
|
+
"topics": {
|
|
37
|
+
"devcenter": {
|
|
38
|
+
"description": "interact with Heroku Dev Center"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
48
41
|
},
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"url": "https://github.com/heroku/heroku-devcenter-plugin"
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=22"
|
|
52
44
|
},
|
|
53
45
|
"scripts": {
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
46
|
+
"build": "npm run clean && tsc && oclif manifest && oclif readme",
|
|
47
|
+
"clean": "rm -rf dist",
|
|
48
|
+
"lint": "eslint .",
|
|
49
|
+
"lint:fix": "eslint . --fix",
|
|
50
|
+
"prepare": "npm run build",
|
|
51
|
+
"posttest": "npm run lint",
|
|
52
|
+
"pretest": "npm run build",
|
|
53
|
+
"readme": "oclif readme",
|
|
54
|
+
"test": "c8 --all --check-coverage --reporter=lcov --reporter=text-summary mocha --forbid-only \"test/**/*.test.ts\"",
|
|
55
|
+
"version": "oclif readme && git add README.md"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@heroku-cli/command": "^13.0.0-beta.1",
|
|
59
|
+
"@heroku/heroku-cli-util": "^10.8.0",
|
|
60
|
+
"@oclif/core": "^4.3.0",
|
|
61
|
+
"@oclif/plugin-help": "^6.2.36",
|
|
62
|
+
"cheerio": "^1.2.0",
|
|
63
|
+
"chokidar": "^5.0.0",
|
|
64
|
+
"debug": "^4.4.3",
|
|
65
|
+
"express": "^5.2.1",
|
|
66
|
+
"markdown-it": "^14.1.1",
|
|
67
|
+
"markdown-it-anchor": "^9.2.0",
|
|
68
|
+
"open": "^11.0.0",
|
|
69
|
+
"yaml": "^2.8.3"
|
|
70
|
+
},
|
|
71
|
+
"overrides": {
|
|
72
|
+
"mocha": {
|
|
73
|
+
"serialize-javascript": "^7.0.5"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"@heroku-cli/test-utils": "^0.2.0",
|
|
78
|
+
"@types/chai": "^5.2.3",
|
|
79
|
+
"@types/debug": "^4.1.12",
|
|
80
|
+
"@types/express": "^5.0.6",
|
|
81
|
+
"@types/markdown-it": "^14.1.2",
|
|
82
|
+
"@types/mocha": "^10.0.10",
|
|
83
|
+
"@types/node": "^22.15.3",
|
|
84
|
+
"@types/supertest": "^7.2.0",
|
|
85
|
+
"ansis": "^3.17.0",
|
|
86
|
+
"c8": "^11.0.0",
|
|
87
|
+
"chai": "^6.2.2",
|
|
88
|
+
"eslint": "^9.39.4",
|
|
89
|
+
"eslint-config-oclif": "^6.0.156",
|
|
90
|
+
"eslint-plugin-mocha": "^11.2.0",
|
|
91
|
+
"mocha": "^11.7.5",
|
|
92
|
+
"nock": "^14.0.12",
|
|
93
|
+
"oclif": "^4.22.81",
|
|
94
|
+
"sinon": "^21.0.3",
|
|
95
|
+
"supertest": "^7.2.2",
|
|
96
|
+
"tsx": "^4.21.0",
|
|
97
|
+
"typescript": "^5.4.0"
|
|
59
98
|
}
|
|
60
99
|
}
|
package/lib/commands/docs.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/command';
|
|
2
|
-
export default class Docs extends Command {
|
|
3
|
-
static description: string;
|
|
4
|
-
static examples: string[];
|
|
5
|
-
static flags: {
|
|
6
|
-
help: {
|
|
7
|
-
name: string;
|
|
8
|
-
char?: "a" | "b" | "i" | "p" | "q" | "s" | "u" | "g" | "c" | "d" | "e" | "f" | "h" | "j" | "k" | "l" | "m" | "n" | "o" | "r" | "t" | "v" | "x" | "y" | "z" | "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "X" | "Y" | "Z" | undefined;
|
|
9
|
-
description?: string | undefined;
|
|
10
|
-
hidden?: boolean | undefined;
|
|
11
|
-
required?: boolean | undefined;
|
|
12
|
-
dependsOn?: string[] | undefined;
|
|
13
|
-
exclusive?: string[] | undefined;
|
|
14
|
-
env?: string | undefined;
|
|
15
|
-
parse(input: boolean, context: any): void;
|
|
16
|
-
} & {
|
|
17
|
-
type: "boolean";
|
|
18
|
-
allowNo: boolean;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
static args: {
|
|
22
|
-
name: string;
|
|
23
|
-
}[];
|
|
24
|
-
run(): Promise<void>;
|
|
25
|
-
}
|
package/lib/commands/docs.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const command_1 = require("@oclif/command");
|
|
4
|
-
const cli = require('heroku-cli-util');
|
|
5
|
-
const opn = require('opn');
|
|
6
|
-
class Docs extends command_1.Command {
|
|
7
|
-
async run() {
|
|
8
|
-
const { args, flags } = this.parse(Docs);
|
|
9
|
-
if (args.query) {
|
|
10
|
-
this.log(`Searching Dev Center for ${cli.color.magenta(args.query)}...`);
|
|
11
|
-
opn(`https://devcenter.heroku.com/search?q=${args.query}`);
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
this.log('Opening Dev Center...');
|
|
15
|
-
opn('https://devcenter.heroku.com');
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
Docs.description = 'opens the Heroku Dev Center';
|
|
20
|
-
Docs.examples = [
|
|
21
|
-
`$ heroku docs
|
|
22
|
-
Opening Dev Center in your default browser...
|
|
23
|
-
`,
|
|
24
|
-
];
|
|
25
|
-
Docs.flags = {
|
|
26
|
-
help: command_1.flags.help({ char: 'h' }),
|
|
27
|
-
};
|
|
28
|
-
Docs.args = [{ name: 'query' }];
|
|
29
|
-
exports.default = Docs;
|
package/lib/index.d.ts
DELETED
package/lib/index.js
DELETED