mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-15 05:52:16 +08:00
* Add missing API switch for GHES (#200) * Vidya reddy/prettier code (#203) * switch none deployment strategy to basic (#204) * switch none deployment strategy to basic * update readme * update deployment strategy fallthrough logic * comment fixed * add disclaimer for basic strategy only supporting deploy action * Hari/beautify logs (#206) * Logging changes for deploy * Logging Changes with group * format check changes * Add ncc build to build script (#208) Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com> * Logging Changes for Promote, Reject actions (#207) * add clean function (#211) * Added Traffic split annotations (#215) * Added Traffic split annotations * traffic split - blueGreen deployment * traffic split - canary deployment * Traffic split annotations - canary deployment * updated Readme and action.yml * Traffic split - canary deployment * clean code * Clean code * Clean code * Create annotation object * Updated Readme and action.yml * Spelling correction Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com> * Swap annotation key to actions.github.com prefix (#216) * Private Cluster functionality (#214) * Fixed Blue/Green Strategy Ingress Route-Method Glitch (#217) * Added some tests, not sure what else to try but gonna think of more examples * forgot some files * reverted package-lock.json * Added empty dir test * Cleaned up some extra spaces * Add node modules and compiled JavaScript from main * forgot to actually include functionality * removed unnecessary files * Update .gitignore * Update .gitignore * Update .gitignore * thx david * renamed searchFilesRec * integrations test fix * added examples to README * added note about depth * added additional note * removed ticks * changed version string * removed conflict on readme * Added tests for bluegreen helper and resolved issue with ingress not being read correctly, still have to figure out why new services aren't showing up * resolved services name issue * looks functional, beginning refactor now * refactored deploy methods for type error * Removed refactor comments * prettier * implemented Oliver's feedback * prettier * added optional chaining operator * removed refactor comment Co-authored-by: Jaiveer Katariya <jaiveerkatariya@Jaiveers-MacBook-Pro.local> Co-authored-by: Oliver King <oking3@uncc.edu> Co-authored-by: Jaiveer Katariya <jaiveerkatariya@Jaiveers-MBP.lan> * Add node modules and compiled JavaScript from main Co-authored-by: nv35 <76777923+nv35@users.noreply.github.com> Co-authored-by: Vidya <59590642+Vidya2606@users.noreply.github.com> Co-authored-by: David Gamero <david340804@gmail.com> Co-authored-by: Hariharan Subramanian <105889062+hsubramanianaks@users.noreply.github.com> Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com> Co-authored-by: Oliver King <oking3@uncc.edu> Co-authored-by: Marcus-Hines <marcus.chris.hines@gmail.com> Co-authored-by: Jaiveer Katariya <35347859+jaiveerk@users.noreply.github.com> Co-authored-by: Jaiveer Katariya <jaiveerkatariya@Jaiveers-MacBook-Pro.local> Co-authored-by: Jaiveer Katariya <jaiveerkatariya@Jaiveers-MBP.lan>
105 lines
6.7 KiB
Markdown
105 lines
6.7 KiB
Markdown
# whatwg-url
|
||
|
||
whatwg-url is a full implementation of the WHATWG [URL Standard](https://url.spec.whatwg.org/). It can be used standalone, but it also exposes a lot of the internal algorithms that are useful for integrating a URL parser into a project like [jsdom](https://github.com/jsdom/jsdom).
|
||
|
||
## Specification conformance
|
||
|
||
whatwg-url is currently up to date with the URL spec up to commit [0672f2e](https://github.com/whatwg/url/commit/0672f2e2ef43aca18b59d90abb6dac21712399bb).
|
||
|
||
For `file:` URLs, whose [origin is left unspecified](https://url.spec.whatwg.org/#concept-url-origin), whatwg-url chooses to use a new opaque origin (which serializes to `"null"`).
|
||
|
||
whatwg-url does not yet implement any encoding handling beyond UTF-8. That is, the _encoding override_ parameter does not exist in our API.
|
||
|
||
## API
|
||
|
||
### The `URL` and `URLSearchParams` classes
|
||
|
||
The main API is provided by the [`URL`](https://url.spec.whatwg.org/#url-class) and [`URLSearchParams`](https://url.spec.whatwg.org/#interface-urlsearchparams) exports, which follows the spec's behavior in all ways (including e.g. `USVString` conversion). Most consumers of this library will want to use these.
|
||
|
||
### Low-level URL Standard API
|
||
|
||
The following methods are exported for use by places like jsdom that need to implement things like [`HTMLHyperlinkElementUtils`](https://html.spec.whatwg.org/#htmlhyperlinkelementutils). They mostly operate on or return an "internal URL" or ["URL record"](https://url.spec.whatwg.org/#concept-url) type.
|
||
|
||
- [URL parser](https://url.spec.whatwg.org/#concept-url-parser): `parseURL(input, { baseURL })`
|
||
- [Basic URL parser](https://url.spec.whatwg.org/#concept-basic-url-parser): `basicURLParse(input, { baseURL, url, stateOverride })`
|
||
- [URL serializer](https://url.spec.whatwg.org/#concept-url-serializer): `serializeURL(urlRecord, excludeFragment)`
|
||
- [Host serializer](https://url.spec.whatwg.org/#concept-host-serializer): `serializeHost(hostFromURLRecord)`
|
||
- [Serialize an integer](https://url.spec.whatwg.org/#serialize-an-integer): `serializeInteger(number)`
|
||
- [Origin](https://url.spec.whatwg.org/#concept-url-origin) [serializer](https://html.spec.whatwg.org/multipage/origin.html#ascii-serialisation-of-an-origin): `serializeURLOrigin(urlRecord)`
|
||
- [Set the username](https://url.spec.whatwg.org/#set-the-username): `setTheUsername(urlRecord, usernameString)`
|
||
- [Set the password](https://url.spec.whatwg.org/#set-the-password): `setThePassword(urlRecord, passwordString)`
|
||
- [Cannot have a username/password/port](https://url.spec.whatwg.org/#cannot-have-a-username-password-port): `cannotHaveAUsernamePasswordPort(urlRecord)`
|
||
- [Percent decode](https://url.spec.whatwg.org/#percent-decode): `percentDecode(buffer)`
|
||
|
||
The `stateOverride` parameter is one of the following strings:
|
||
|
||
- [`"scheme start"`](https://url.spec.whatwg.org/#scheme-start-state)
|
||
- [`"scheme"`](https://url.spec.whatwg.org/#scheme-state)
|
||
- [`"no scheme"`](https://url.spec.whatwg.org/#no-scheme-state)
|
||
- [`"special relative or authority"`](https://url.spec.whatwg.org/#special-relative-or-authority-state)
|
||
- [`"path or authority"`](https://url.spec.whatwg.org/#path-or-authority-state)
|
||
- [`"relative"`](https://url.spec.whatwg.org/#relative-state)
|
||
- [`"relative slash"`](https://url.spec.whatwg.org/#relative-slash-state)
|
||
- [`"special authority slashes"`](https://url.spec.whatwg.org/#special-authority-slashes-state)
|
||
- [`"special authority ignore slashes"`](https://url.spec.whatwg.org/#special-authority-ignore-slashes-state)
|
||
- [`"authority"`](https://url.spec.whatwg.org/#authority-state)
|
||
- [`"host"`](https://url.spec.whatwg.org/#host-state)
|
||
- [`"hostname"`](https://url.spec.whatwg.org/#hostname-state)
|
||
- [`"port"`](https://url.spec.whatwg.org/#port-state)
|
||
- [`"file"`](https://url.spec.whatwg.org/#file-state)
|
||
- [`"file slash"`](https://url.spec.whatwg.org/#file-slash-state)
|
||
- [`"file host"`](https://url.spec.whatwg.org/#file-host-state)
|
||
- [`"path start"`](https://url.spec.whatwg.org/#path-start-state)
|
||
- [`"path"`](https://url.spec.whatwg.org/#path-state)
|
||
- [`"cannot-be-a-base-URL path"`](https://url.spec.whatwg.org/#cannot-be-a-base-url-path-state)
|
||
- [`"query"`](https://url.spec.whatwg.org/#query-state)
|
||
- [`"fragment"`](https://url.spec.whatwg.org/#fragment-state)
|
||
|
||
The URL record type has the following API:
|
||
|
||
- [`scheme`](https://url.spec.whatwg.org/#concept-url-scheme)
|
||
- [`username`](https://url.spec.whatwg.org/#concept-url-username)
|
||
- [`password`](https://url.spec.whatwg.org/#concept-url-password)
|
||
- [`host`](https://url.spec.whatwg.org/#concept-url-host)
|
||
- [`port`](https://url.spec.whatwg.org/#concept-url-port)
|
||
- [`path`](https://url.spec.whatwg.org/#concept-url-path) (as an array)
|
||
- [`query`](https://url.spec.whatwg.org/#concept-url-query)
|
||
- [`fragment`](https://url.spec.whatwg.org/#concept-url-fragment)
|
||
- [`cannotBeABaseURL`](https://url.spec.whatwg.org/#url-cannot-be-a-base-url-flag) (as a boolean)
|
||
|
||
These properties should be treated with care, as in general changing them will cause the URL record to be in an inconsistent state until the appropriate invocation of `basicURLParse` is used to fix it up. You can see examples of this in the URL Standard, where there are many step sequences like "4. Set context object’s url’s fragment to the empty string. 5. Basic URL parse _input_ with context object’s url as _url_ and fragment state as _state override_." In between those two steps, a URL record is in an unusable state.
|
||
|
||
The return value of "failure" in the spec is represented by `null`. That is, functions like `parseURL` and `basicURLParse` can return _either_ a URL record _or_ `null`.
|
||
|
||
### `whatwg-url/webidl2js-wrapper` module
|
||
|
||
This module exports the `URL` and `URLSearchParams` [interface wrappers API](https://github.com/jsdom/webidl2js#for-interfaces) generated by [webidl2js](https://github.com/jsdom/webidl2js).
|
||
|
||
## Development instructions
|
||
|
||
First, install [Node.js](https://nodejs.org/). Then, fetch the dependencies of whatwg-url, by running from this directory:
|
||
|
||
npm install
|
||
|
||
To run tests:
|
||
|
||
npm test
|
||
|
||
To generate a coverage report:
|
||
|
||
npm run coverage
|
||
|
||
To build and run the live viewer:
|
||
|
||
npm run prepare
|
||
npm run build-live-viewer
|
||
|
||
Serve the contents of the `live-viewer` directory using any web server.
|
||
|
||
## Supporting whatwg-url
|
||
|
||
The jsdom project (including whatwg-url) is a community-driven project maintained by a team of [volunteers](https://github.com/orgs/jsdom/people). You could support us by:
|
||
|
||
- [Getting professional support for whatwg-url](https://tidelift.com/subscription/pkg/npm-whatwg-url?utm_source=npm-whatwg-url&utm_medium=referral&utm_campaign=readme) as part of a Tidelift subscription. Tidelift helps making open source sustainable for us while giving teams assurances for maintenance, licensing, and security.
|
||
- Contributing directly to the project.
|